/* TrueTerm story rail — horizontal “ad story” panels (MSN-style right-to-left scroll) */
.tt-story {
  --tt-ink: #0f172a;
  --tt-muted: #64748b;
  --tt-line: #e2e8f0;
  --tt-blue: #0369a1;
  --tt-blue-deep: #0c4a6e;
  --tt-soft: #e0f2fe;
  --tt-green: #047857;
  --tt-amber: #b45309;
  margin: 1.25rem 0 0.5rem;
  position: relative;
}

.tt-story-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tt-story-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--tt-ink);
}

.tt-story-head p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--tt-muted);
}

.tt-story-controls {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.tt-story-controls button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--tt-line);
  background: #fff;
  color: var(--tt-ink);
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.tt-story-controls button:hover {
  border-color: #7dd3fc;
  background: var(--tt-soft);
}

.tt-story-viewport {
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid #7dd3fc;
  background: linear-gradient(155deg, #0c4a6e 0%, #0369a1 48%, #0e7490 100%);
  box-shadow: 0 22px 56px rgba(3, 105, 161, 0.3);
  perspective: 1200px;
}

.tt-story-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}

.tt-story-track::-webkit-scrollbar {
  display: none;
}

.tt-story-panel {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: min(460px, 72vh);
  /* Generous inset — never crowd the blue border */
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4.5vw, 3rem);
  color: #f0f9ff;
  position: relative;
  transform-style: preserve-3d;
}

.tt-story-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at 8% 88%, rgba(16, 185, 129, 0.2), transparent 48%);
  pointer-events: none;
}

.tt-story-panel-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  box-sizing: border-box;
}

.tt-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bae6fd;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(186, 230, 253, 0.35);
}

.tt-story-panel h3 {
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: clamp(1.4rem, 3.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 20ch;
}

.tt-story-panel .tt-one-line {
  margin: 0 0 1.35rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #e0f2fe;
  max-width: 38rem;
}

/* Path cards — dual lane story (not a rate table) */
.tt-path-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.85rem;
  align-items: stretch;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .tt-path-stage {
    grid-template-columns: 1fr;
  }
  .tt-or {
    padding: 0.15rem 0;
  }
}

.tt-path-card {
  border-radius: 1.15rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  min-width: 0;
}

.tt-path-card .tt-path-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a7f3d0;
  margin: 0 0 0.55rem;
}

.tt-path-card.is-term .tt-path-label {
  color: #bae6fd;
}

.tt-path-card .tt-path-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: #fff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tt-path-card .tt-path-copy {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #e0f2fe;
  margin: 0 0 0.85rem;
  opacity: 0.95;
}

/* Visual blocks */
.tt-viz-grid {
  display: grid;
  gap: 0.85rem;
}

.tt-viz-2 {
  grid-template-columns: 1fr 1fr;
}

.tt-viz-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
  .tt-viz-2,
  .tt-viz-3 {
    grid-template-columns: 1fr;
  }
  .tt-story-panel {
    min-height: 380px;
  }
}

.tt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tt-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 4.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  transform: translateZ(20px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.tt-chip strong {
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.tt-chip span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #bae6fd;
  margin-top: 0.15rem;
}

.tt-chip.is-bnpl {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(167, 243, 208, 0.45);
}

.tt-chip.is-term {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(186, 230, 253, 0.45);
}

.tt-or {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #7dd3fc;
  text-align: center;
  padding: 0.35rem;
}

.tt-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 560px) {
  .tt-compare {
    grid-template-columns: 1fr;
  }
}

.tt-compare-card {
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.25);
  transform: rotateY(-2deg) translateZ(12px);
}

.tt-compare-card.good {
  background: rgba(6, 95, 70, 0.45);
  border-color: rgba(167, 243, 208, 0.4);
  transform: rotateY(2deg) translateZ(18px);
}

.tt-compare-card .lbl {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bae6fd;
}

.tt-compare-card .metric {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 0.35rem 0 0.25rem;
  letter-spacing: -0.03em;
}

.tt-compare-card .note {
  font-size: 0.78rem;
  color: #e0f2fe;
  line-height: 1.35;
}

.tt-asset-viz {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.tt-asset-orb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef3c7, #f59e0b 45%, #0f172a 100%);
  border: 2px solid rgba(253, 224, 71, 0.6);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: #0f172a;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.45);
  transform: translateZ(30px);
}

.tt-asset-steps {
  flex: 1;
  min-width: 180px;
  display: grid;
  gap: 0.4rem;
}

.tt-asset-steps div {
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tt-flow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.tt-flow-row .node {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.tt-flow-row .arr {
  color: #7dd3fc;
  font-size: 0.75rem;
}

.tt-form-mock {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transform: translateZ(24px) rotateX(4deg);
  max-width: 320px;
}

.tt-form-mock .bar {
  height: 8px;
  border-radius: 99px;
  background: #e2e8f0;
  margin-bottom: 0.55rem;
}

.tt-form-mock .bar.short { width: 45%; }
.tt-form-mock .bar.mid { width: 70%; background: #bae6fd; }
.tt-form-mock .bar.long { width: 100%; background: #a7f3d0; }
.tt-form-mock .label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.tt-story-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tt-story-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
}

.tt-story-dots button.is-on {
  width: 22px;
  background: #0369a1;
}

.tt-story-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--tt-muted);
  margin-top: 0.4rem;
}

/* Dark panel on white product pages */
.tt-story.on-light .tt-story-viewport {
  /* already blue gradient */
}

/* Applicant home: open light hero — not a cramped blue brick */
#view-applicant-home .hero.tt-hero-slim {
  background: transparent;
  color: inherit;
  border-radius: 0;
  padding: 0.35rem 0 0.5rem;
  margin-bottom: 0.35rem;
  box-shadow: none;
}
#view-applicant-home .hero.tt-hero-slim h1 {
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  margin: 0 0 0.55rem;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 22ch;
}
#view-applicant-home .hero.tt-hero-slim > p {
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  color: #475569;
  opacity: 1;
}
#view-applicant-home .hero.tt-hero-slim .tt-hero-kicker {
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0369a1;
  margin-bottom: 0.55rem;
}
