/* 508 Ministry - Regulated Social Sharing & 4-Step Habit Ladder UI
 * Self-hosted Cormorant + Figtree tokens, navy/gold/sunlit-oak palette, 390px-1440px responsive.
 * 60fps GPU-composited living animations with full prefers-reduced-motion support.
 */
.rs508-wrap {
  background: linear-gradient(180deg, #F5FAFF 0%, #EEF5FD 100%);
  border: 1.5px solid #CFE0F3;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(13, 30, 64, 0.09);
  margin: 0 0 16px 0;
  overflow: hidden;
  color: #102042;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 100%;
  box-sizing: border-box;
}

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

/* ============================================================
 * TOP DEEP-NAVY HEADER STRIP
 * ============================================================ */
.rs508-hd {
  background: linear-gradient(122deg, #0B1936 0%, #12264E 54%, #183264 100%);
  color: #FFFFFF;
  padding: 18px 20px 16px;
  border-bottom: 2px solid #D9AE53;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  position: relative;
  overflow: hidden;
}

.rs508-hd::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 240px;
  height: 150px;
  background: radial-gradient(ellipse at center, rgba(64, 168, 255, 0.24) 0%, rgba(64, 168, 255, 0) 72%);
  pointer-events: none;
}

.rs508-hd-left {
  min-width: 0;
  flex: 1 1 280px;
  position: relative;
  z-index: 1;
}

.rs508-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #F6CB6C;
  margin-bottom: 4px;
}

.rs508-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  color: #FFFFFF;
  letter-spacing: -0.005em;
  font-variant-numeric: lining-nums;
}

.rs508-sub {
  font-size: 12.6px;
  color: #D2E1F6;
  margin: 7px 0 0;
  line-height: 1.44;
  max-width: 430px;
}

.rs508-hd-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.rs508-hd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.rs508-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(217, 174, 83, 0.14);
  border: 1.25px solid #D9AE53;
  color: #F9DC8F;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.rs508-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFF3C4 0%, #E7BE5E 100%);
  color: #141C38;
  font-size: 11.8px;
  font-weight: 800;
  border: 1px solid #FFF7DA;
  box-shadow: 0 3px 12px rgba(212, 168, 75, 0.36);
  white-space: nowrap;
}

.rs508-badge-pill.is-locked {
  background: rgba(255, 255, 255, 0.1);
  color: #E2ECFB;
  border: 1px solid rgba(196, 220, 250, 0.28);
  box-shadow: none;
  font-weight: 700;
}

.rs508-star-twinkle {
  display: inline-block;
  color: #F9D976;
  animation: rs508StarTwinkle 2.8s ease-in-out infinite;
  transform-origin: center;
}

.rs508-badge-pill:not(.is-locked) .rs508-star-twinkle {
  color: #8A5A00;
}

/* 24-Bar Luminous Sky-Blue Header Waveform */
.rs508-wave-hd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 26px;
  padding: 2px 4px;
}

.rs508-wave-hd .rs508-wbar {
  width: 3px;
  height: var(--h, 14px);
  border-radius: 999px;
  background: linear-gradient(180deg, #8AE0FF 0%, #3E9EFF 55%, #1E6CE0 100%);
  box-shadow: 0 0 7px rgba(72, 180, 255, 0.45);
  transform-origin: center center;
  animation: rs508WaveBreath var(--dur, 2.2s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

/* ============================================================
 * MAIN BODY CONTAINER
 * ============================================================ */
.rs508-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

/* Honest Promise / Extension / Lockout Banners */
.rs508-banner {
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 12.6px;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rs508-banner.is-warn {
  background: #FFF9E8;
  border: 1.5px solid #DFB24D;
  color: #3D2B05;
}

.rs508-banner.is-lock {
  background: #FEF3F2;
  border: 1.5px solid #E5A09B;
  color: #5C1A16;
}

.rs508-banner.is-ok {
  background: #E8F7EF;
  border: 1.5px solid #74C69D;
  color: #0F4C2E;
}

.rs508-banner.is-info {
  background: #FFFFFF;
  border: 1.25px solid #C8DBF1;
  color: #1A315A;
}

.rs508-banner strong {
  font-weight: 800;
}

/* ============================================================
 * 4-STEP LADDER GRID + SUNLIT MINI-VISUALS
 * ============================================================ */
.rs508-ladder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rs508-step-card {
  border-radius: 15px;
  border: 1.5px solid #D7E4F4;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFE 100%);
  padding: 11px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rs508-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 38, 82, 0.09);
}

.rs508-step-card.is-current {
  background: linear-gradient(180deg, #FFFDF5 0%, #FFF7E4 100%);
  border-color: #DFB04A;
  box-shadow: 0 6px 18px rgba(212, 168, 75, 0.2);
}

.rs508-step-card.is-completed {
  background: linear-gradient(180deg, #F6FDF9 0%, #EAF8F0 100%);
  border-color: #7CC89E;
}

.rs508-step-card.is-locked {
  opacity: 0.98;
}

.rs508-step-card[data-step="3"] {
  padding-bottom: 11px;
}

.rs508-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.rs508-step-num {
  font-size: 9.8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #394F75;
  white-space: nowrap;
}

.rs508-step-state {
  font-size: 8.8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rs508-step-card.is-current .rs508-step-state {
  background: linear-gradient(135deg, #F6CF70 0%, #E0AA3D 100%);
  color: #141C38;
  box-shadow: 0 2px 6px rgba(212, 168, 75, 0.35);
}

.rs508-step-card.is-completed .rs508-step-state {
  background: #16794C;
  color: #FFFFFF;
}

.rs508-step-card.is-locked .rs508-step-state {
  background: #E4EEF9;
  color: #3E557B;
}

.rs508-step-name {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #0E1D3E;
  line-height: 1.12;
  margin-top: 1px;
}

.rs508-step-desc {
  font-size: 11.2px;
  color: #42567A;
  line-height: 1.38;
}

/* Step 3 Steward Badge with Golden Shimmer */
.rs508-step-badge-tag {
  margin-top: auto;
  padding: 7px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFF7DE 0%, #FDECC0 100%);
  border: 1px solid #E7C36A;
  font-size: 10.6px;
  font-weight: 800;
  color: #7D5303;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
}

.rs508-step-badge-tag::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.68) 48%, transparent 72%);
  transform: translateX(-130%);
  animation: rs508GoldSheen 4.6s ease-in-out infinite;
  pointer-events: none;
}

/* Step 1, 2, 4 Bottom Mini-Visual Stage */
.rs508-step-art {
  margin: auto -10px 0;
  padding-top: 6px;
  position: relative;
  height: 86px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.rs508-step-art.is-s1 {
  background: linear-gradient(180deg, #FFFDF5 0%, #FFF4DA 71%, #F1D8B7 71.2%, #DFBC8F 88%, #CEAA7B 100%);
}

.rs508-step-art.is-s2 {
  background: linear-gradient(180deg, #F4F9FF 0%, #F4F9FF 71%, #F1D9B9 71.2%, #D4B082 100%);
}

.rs508-step-art.is-s4 {
  background: #F7FAFE;
}

.rs508-step-art svg {
  width: 100%;
  max-width: 220px;
  height: 100%;
  display: block;
}

/* Animated elements inside Step 1, 2, 4 SVGs */
.rs508-play-btn-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: rs508PlayPulse 2.6s ease-in-out infinite;
}

.rs508-play-sonar {
  transform-box: fill-box;
  transform-origin: center;
  animation: rs508SonarPing 2.6s ease-out infinite;
}

.rs508-spark-ray {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rs508SparkTwinkle 2.1s ease-in-out var(--sd, 0s) infinite;
}

.rs508-steam-wisp {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rs508SteamRise 3.2s ease-in-out var(--st, 0s) infinite;
}

.rs508-cal-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: rs508DotWave 3.6s ease-in-out var(--dd, 0s) infinite;
}

.rs508-bar-col {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: rs508BarRise 2.8s ease-in-out var(--bd, 0s) infinite;
}

.rs508-check-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: rs508CheckPulse 2.5s ease-in-out infinite;
}

/* ============================================================
 * MIDDLE FULL-WIDTH PROGRESS & SUNLIT DESK SCENE CARD
 * ============================================================ */
.rs508-progress-box {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FBFF 100%);
  border: 1.5px solid #D3E3F5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(17, 42, 88, 0.06);
}

.rs508-progress-top {
  padding: 13px 16px 11px;
}

.rs508-progress-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.rs508-progress-label {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  color: #0F1F44;
  line-height: 1.12;
  font-variant-numeric: lining-nums;
}

.rs508-progress-count {
  font-size: 12.2px;
  font-weight: 800;
  color: #1D5CC8;
}

.rs508-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #DCE7F6;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.rs508-bar-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.58) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: rs508ProgressSweep 3.8s ease-in-out infinite;
  pointer-events: none;
}

.rs508-bar-fill {
  height: 100%;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1E5CC8 0%, #44A8FF 56%, #E8B84B 100%);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 1;
}

.rs508-progress-note {
  font-size: 12.1px;
  color: #364B70;
  line-height: 1.44;
}

/* Sunlit Warm-Oak Desk Visual Banner */
.rs508-desk-banner {
  position: relative;
  background: linear-gradient(180deg, #EDF5FF 0%, #F7FBFF 64%, #EAD1B0 64.1%, #DBB98C 88%, #CCA472 100%);
  border-top: 1px solid #DFECF8;
  padding: 12px 14px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1.15fr);
  align-items: end;
  gap: 8px;
  overflow: hidden;
  min-height: 138px;
}

.rs508-desk-sunbeam {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 248, 224, 0.52) 0%, rgba(255, 255, 255, 0) 42%, rgba(255, 245, 214, 0.34) 72%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  animation: rs508SunbeamBreath 6.5s ease-in-out infinite;
}

.rs508-desk-left,
.rs508-desk-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.rs508-desk-left svg,
.rs508-desk-right svg {
  width: 100%;
  max-width: 245px;
  height: auto;
  display: block;
}

.rs508-desk-arrow-path {
  animation: rs508ArrowFlow 2.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: left center;
}

.rs508-desk-center {
  position: relative;
  z-index: 2;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 14px;
}

.rs508-desk-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F9FF 100%);
  border: 1.5px solid #C8DDF5;
  box-shadow: 0 8px 20px rgba(24, 64, 134, 0.13);
  animation: rs508PillFloat 3.6s ease-in-out infinite;
  will-change: transform;
}

.rs508-desk-pill-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #E8F3FF 0%, #D2E8FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rs508-desk-pill-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.rs508-desk-pill-main {
  font-size: 12px;
  font-weight: 800;
  color: #102042;
  white-space: nowrap;
}

.rs508-desk-pill-sub {
  font-size: 10px;
  font-weight: 600;
  color: #4D6286;
  white-space: nowrap;
}

.rs508-pill-sparks {
  position: absolute;
  top: -15px;
  right: -12px;
  width: 28px;
  height: 24px;
  pointer-events: none;
}

/* ============================================================
 * BOTTOM 2-COLUMN SPLIT ROW
 * ============================================================ */
.rs508-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 12px;
}

.rs508-panel {
  border: 1.5px solid #D4E3F4;
  border-radius: 16px;
  padding: 13px 14px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 5px 16px rgba(17, 38, 82, 0.05);
  min-width: 0;
}

.rs508-panel-title {
  font-size: 11.4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #102042;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rs508-panel-title-left {
  line-height: 1.25;
}

.rs508-panel-cap-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.rs508-panel-cap-txt {
  font-size: 9.2px;
  font-weight: 800;
  color: #2A4370;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: right;
}

/* Mini 18-Bar Cadence Waveform in Runway Panel */
.rs508-wave-mini {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.rs508-wave-mini .rs508-mwbar {
  width: 2.2px;
  height: var(--mh, 10px);
  border-radius: 999px;
  background: linear-gradient(180deg, #62C2FF 0%, #2B84F0 100%);
  transform-origin: center center;
  animation: rs508MiniWaveBreath var(--mdur, 2s) ease-in-out var(--mdelay, 0s) infinite;
  will-change: transform, opacity;
}

/* 3 Soft Sky-Blue KPI Stat Tiles */
.rs508-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.rs508-kpi {
  background: linear-gradient(180deg, #F3F8FF 0%, #EAF3FE 100%);
  border: 1px solid #D5E5F8;
  border-radius: 12px;
  padding: 9px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.rs508-kpi-val {
  font-size: 16px;
  font-weight: 800;
  color: #0E1F44;
  line-height: 1.15;
}

.rs508-kpi-val.is-compact {
  font-size: 13px;
}

.rs508-kpi-lbl {
  font-size: 10.4px;
  font-weight: 600;
  color: #465B80;
  line-height: 1.25;
}

.rs508-kpi-ico {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.rs508-kpi-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

.rs508-kpi-ico.is-float svg {
  animation: rs508PillFloat 3.4s ease-in-out infinite;
}

.rs508-kpi-ico.is-pulse svg {
  animation: rs508CheckPulse 2.8s ease-in-out infinite;
}

/* Interactive Sunlit Desk Laptop Mockup (Runway Bottom) */
.rs508-laptop-stage {
  margin: auto -14px -13px;
  padding: 18px 14px 10px;
  background: linear-gradient(180deg, #F5FAFF 0%, #EEF6FF 70%, #EAD2B1 70.2%, #D9B78A 100%);
  border-top: 1px solid #E1ECF8;
  border-radius: 0 0 14px 14px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

.rs508-laptop-plant {
  width: 34px;
  flex-shrink: 0;
  margin-bottom: 4px;
  pointer-events: none;
}

.rs508-laptop-shell {
  position: relative;
  flex: 1 1 auto;
  max-width: 244px;
  min-width: 0;
}

.rs508-laptop-sparks {
  position: absolute;
  top: -15px;
  right: -14px;
  width: 26px;
  height: 24px;
  pointer-events: none;
  z-index: 3;
}

.rs508-laptop-lid {
  background: #172136;
  border-radius: 10px 10px 3px 3px;
  padding: 6px 6px 5px;
  box-shadow: 0 8px 18px rgba(13, 28, 56, 0.22);
  position: relative;
}

.rs508-laptop-cam {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #2C3A58;
  margin: 0 auto 4px;
}

.rs508-laptop-screen {
  background: #FFFFFF;
  border-radius: 5px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rs508-plat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3.5px 4px;
  border-radius: 7px;
  background: #F8FBFF;
  border: 1px solid #E7F0FA;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.rs508-plat-row:hover {
  background: #EDF5FF;
  border-color: #BDD8F7;
}

.rs508-plat-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rs508-plat-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs508-plat-name {
  font-size: 11px;
  font-weight: 700;
  color: #142344;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs508-plat-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: #EBF4FF;
  border: 1px solid #C6DDF8;
  color: #184C9E;
  font-size: 10.2px;
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.rs508-plat-connect:hover {
  background: #1B5AC4;
  border-color: #1B5AC4;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.rs508-laptop-base {
  height: 7px;
  margin: 0 -10px;
  background: linear-gradient(180deg, #E3EAF4 0%, #B8C4D6 100%);
  border-radius: 0 0 8px 8px;
  position: relative;
  box-shadow: 0 4px 8px rgba(42, 32, 18, 0.22);
}

.rs508-laptop-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #9AA8BE;
}

/* ============================================================
 * COMPOUNDING OUTREACH RIGHT CARD + FLOATING 3D GIFT BOX
 * ============================================================ */
.rs508-conn-badge {
  font-size: 11.2px;
  font-weight: 800;
  color: #102042;
  white-space: nowrap;
}

.rs508-comp-dots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.rs508-comp-dot {
  height: 28px;
  border-radius: 999px;
  border: 1.25px solid #D1E1F5;
  background: #F4F9FF;
  color: #1E3560;
  font-size: 11.2px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
  animation: rs508MultWave 4.2s ease-in-out var(--wd, 0s) infinite;
}

.rs508-comp-dot:hover {
  transform: translateY(-1px);
  border-color: #3E8AE8;
  background: #E8F3FF;
}

.rs508-comp-dot.is-on,
.rs508-comp-dot.is-preview {
  animation: none;
  border-style: solid;
  border-color: #D4A84B;
  background: linear-gradient(135deg, #102042 0%, #213A6E 100%);
  color: #FCE296;
  box-shadow: 0 3px 9px rgba(16, 32, 66, 0.22);
}

.rs508-comp-math-hint {
  font-size: 11px;
  font-weight: 700;
  color: #1D58B8;
  background: #F0F7FF;
  border: 1px solid #D4E6FA;
  border-radius: 9px;
  padding: 5px 9px;
  line-height: 1.35;
}

.rs508-comp-text {
  font-size: 12.2px;
  color: #213559;
  line-height: 1.46;
}

.rs508-comp-honest {
  font-size: 11.2px;
  color: #5C6E8F;
  line-height: 1.4;
}

.rs508-comp-cta-row {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

/* Sculpted Warm Honey-Gold Button */
.rs508-btn-honey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FBD97A 0%, #F0B946 100%);
  border: 1.5px solid #D99F2F;
  color: #141C38;
  font-size: 11.8px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(217, 159, 47, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  flex: 1 1 auto;
  text-align: center;
}

.rs508-btn-honey::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, 0.56) 50%, transparent 72%);
  transform: translateX(-135%);
  animation: rs508GoldSheen 4.2s ease-in-out 1.1s infinite;
  pointer-events: none;
}

.rs508-btn-honey:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 8px 18px rgba(217, 159, 47, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

/* Floating 3D Gold-Ribbon Gift Box */
.rs508-gift-stage {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rs508-gift-box {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 50% 54%, #000 50%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 54%, #000 50%, transparent 74%);
  animation: rs508GiftFloat 3.4s ease-in-out infinite;
  will-change: transform;
  position: relative;
  z-index: 2;
}

.rs508-gift-shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 48px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(16, 36, 72, 0.22) 0%, rgba(16, 36, 72, 0) 72%);
  transform: translateX(-50%);
  animation: rs508ShadowBreath 3.4s ease-in-out infinite;
  z-index: 1;
}

.rs508-gift-sparks {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 3;
}

/* ============================================================
 * PER-CHANNEL RUNWAY LIST, ACTIONS, PREVIEW, TABS & CALENDAR
 * ============================================================ */
.rs508-ch-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rs508-ch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F6FAFF;
  border: 1px solid #D7E5F6;
}

.rs508-ch-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
}

.rs508-ch-name {
  font-size: 12.6px;
  font-weight: 800;
  color: #102042;
}

.rs508-ch-meta {
  font-size: 11.2px;
  color: #4E6285;
}

.rs508-ch-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.8px;
  font-weight: 700;
  color: #1E2A52;
}

.rs508-ch-cap select {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #C8D5E6;
  background: #FFFFFF;
  color: #141C38;
  font-size: 11.8px;
  font-weight: 700;
  min-height: 32px;
}

.rs508-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rs508-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12.6px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.14s ease;
}

.rs508-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.rs508-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.rs508-btn-navy {
  background: #142750;
  color: #FFFFFF;
  border-color: #0E1D3D;
}

.rs508-btn-gold {
  background: linear-gradient(135deg, #FBD97A 0%, #E7B344 100%);
  color: #141C38;
  border-color: #CC9930;
}

.rs508-btn-ghost {
  background: #FFFFFF;
  color: #142750;
  border-color: #C8D8EC;
}

.rs508-btn-danger {
  background: #FFF1F0;
  color: #9A2620;
  border-color: #E7ACA7;
}

.rs508-btn-sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 11.6px;
  border-radius: 8px;
}

.rs508-preview-box {
  background: #FFFDF6;
  border: 2px solid #D4A84B;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rs508-preview-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #141C38;
}

.rs508-preview-math {
  font-size: 13px;
  color: #1E2A52;
  line-height: 1.5;
  background: #FFF6DC;
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 4px solid #D4A84B;
}

.rs508-tabs-wrap {
  background: #FFFFFF;
  border: 1.25px solid #D5E4F5;
  border-radius: 14px;
  padding: 11px 13px 12px;
}

.rs508-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid #E1EBF7;
  padding-bottom: 8px;
}

.rs508-tab {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid #D3E1F2;
  background: #F4F8FE;
  color: #314569;
  font-size: 12.2px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.rs508-tab.is-active {
  background: #142750;
  color: #FFFFFF;
  border-color: #0E1D3D;
}

.rs508-queue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 290px;
  overflow-y: auto;
}

.rs508-q-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #DDE5F0;
  background: #FFFFFF;
  font-size: 12.5px;
}

.rs508-q-info {
  min-width: 0;
  flex: 1 1 200px;
}

.rs508-q-title {
  font-weight: 700;
  color: #141C38;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs508-q-sub {
  font-size: 11.5px;
  color: #5A6987;
  margin-top: 2px;
}

.rs508-cal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rs508-cal-month {
  font-weight: 800;
  font-size: 14px;
  color: #141C38;
}

.rs508-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.rs508-cal-dow {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #667591;
  text-transform: uppercase;
  padding: 3px 0;
}

.rs508-cal-cell {
  min-height: 54px;
  border-radius: 9px;
  border: 1px solid #DDE5F0;
  background: #F9FBFE;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.rs508-cal-cell.is-empty {
  background: transparent;
  border-color: transparent;
}

.rs508-cal-cell.is-today {
  border-color: #D4A84B;
  background: #FFFBF0;
}

.rs508-cal-cell.is-clickable {
  cursor: pointer;
}

.rs508-cal-cell.is-clickable:hover {
  border-color: #1F5FAF;
  background: #EEF4FC;
}

.rs508-cal-daynum {
  font-weight: 800;
  color: #141C38;
  font-size: 11.5px;
}

.rs508-cal-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: #1E2A52;
  color: #FFE89E;
  font-size: 10px;
  font-weight: 700;
  width: fit-content;
}

/* ============================================================
 * SILKY 60FPS GPU-COMPOSITED KEYFRAMES
 * ============================================================ */
@keyframes rs508WaveBreath {
  0%, 100% { transform: scaleY(0.56); opacity: 0.72; }
  50% { transform: scaleY(1.12); opacity: 1; }
}

@keyframes rs508MiniWaveBreath {
  0%, 100% { transform: scaleY(0.52); opacity: 0.68; }
  50% { transform: scaleY(1.16); opacity: 1; }
}

@keyframes rs508StarTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.88; }
  50% { transform: scale(1.22) rotate(14deg); opacity: 1; }
}

@keyframes rs508PlayPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes rs508SonarPing {
  0% { transform: scale(0.86); opacity: 0.72; }
  75% { transform: scale(1.62); opacity: 0; }
  100% { transform: scale(1.62); opacity: 0; }
}

@keyframes rs508SparkTwinkle {
  0%, 100% { transform: scale(0.76); opacity: 0.52; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes rs508SteamRise {
  0% { transform: translateY(3px) scaleY(0.78); opacity: 0; }
  35% { opacity: 0.65; }
  80% { opacity: 0.35; }
  100% { transform: translateY(-7px) scaleY(1.12); opacity: 0; }
}

@keyframes rs508DotWave {
  0%, 62%, 100% { transform: scale(1); opacity: 0.88; }
  22% { transform: scale(1.22); opacity: 1; }
}

@keyframes rs508GoldSheen {
  0%, 58% { transform: translateX(-135%); }
  100% { transform: translateX(155%); }
}

@keyframes rs508BarRise {
  0%, 100% { transform: scaleY(0.84); opacity: 0.82; }
  50% { transform: scaleY(1.08); opacity: 1; }
}

@keyframes rs508CheckPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes rs508ArrowFlow {
  0%, 100% { transform: translateX(0px); opacity: 0.9; }
  50% { transform: translateX(4px); opacity: 1; }
}

@keyframes rs508PillFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

@keyframes rs508SunbeamBreath {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 0.95; }
}

@keyframes rs508ProgressSweep {
  0%, 35% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

@keyframes rs508MultWave {
  0%, 72%, 100% { transform: translateY(0px); }
  18% { transform: translateY(-2.5px); }
}

@keyframes rs508GiftFloat {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes rs508ShadowBreath {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.82; }
  50% { transform: translateX(-50%) scaleX(0.78); opacity: 0.45; }
}

/* ============================================================
 * RESPONSIVE BREAKPOINTS (Tablet & 390px Mobile, 0px Overflow)
 * ============================================================ */
@media (max-width: 960px) {
  .rs508-ladder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rs508-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rs508-hd {
    padding: 15px 14px 14px;
  }
  .rs508-title {
    font-size: 24px;
  }
  .rs508-hd-right {
    width: 100%;
    align-items: flex-start;
  }
  .rs508-hd-pills {
    justify-content: flex-start;
  }
  .rs508-wave-hd {
    justify-content: flex-start;
    padding-left: 0;
  }
  .rs508-body {
    padding: 12px 12px 14px;
    gap: 11px;
  }
  .rs508-desk-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding: 12px 12px 10px;
    background: linear-gradient(180deg, #EDF5FF 0%, #F7FBFF 78%, #EAD1B0 78.2%, #D7B485 100%);
  }
  .rs508-desk-center {
    padding-bottom: 0;
    order: -1;
  }
  .rs508-desk-left svg,
  .rs508-desk-right svg {
    max-width: 240px;
  }
}

@media (max-width: 480px) {
  .rs508-ladder-grid {
    grid-template-columns: 1fr;
  }
  .rs508-step-card {
    padding: 12px 12px 0;
  }
  .rs508-step-art {
    margin: auto -12px 0;
    height: 92px;
  }
  .rs508-panel {
    padding: 12px;
  }
  .rs508-panel-title {
    flex-wrap: wrap;
  }
  .rs508-panel-cap-txt {
    text-align: left;
  }
  .rs508-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .rs508-kpi {
    padding: 8px 6px 7px;
  }
  .rs508-kpi-val {
    font-size: 14.5px;
  }
  .rs508-kpi-val.is-compact {
    font-size: 12px;
  }
  .rs508-laptop-stage {
    margin: auto -12px -12px;
    padding: 10px 8px 10px;
  }
  .rs508-laptop-plant {
    width: 24px;
  }
  .rs508-comp-cta-row {
    align-items: center;
  }
  .rs508-btn-honey {
    font-size: 12px;
    padding: 9px 11px;
  }
  .rs508-gift-stage {
    width: 66px;
    height: 66px;
  }
  .rs508-gift-box {
    width: 64px;
    height: 64px;
  }
  .rs508-cal-cell {
    min-height: 44px;
    padding: 4px;
  }
  .rs508-actions .rs508-btn {
    flex: 1 1 100%;
  }
}

/* ============================================================
 * ACCESSIBILITY: RESPECT REDUCED MOTION PREFERENCE
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .rs508-wrap *,
  .rs508-wrap *::before,
  .rs508-wrap *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
