.lr-live-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
}

.lr-side {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.lr-challenge-card,
.lr-rise-card {
  border: 1px solid color-mix(in srgb, var(--demo-accent) 18%, var(--c-border));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.9rem 1rem;
}

.lr-challenge-card h5 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-navy);
}

.lr-challenge-card p {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #475569;
}

.lr-challenge-card .lr-card-kicker,
.lr-rise-card .lr-card-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--demo-accent);
}

.lr-fit-card {
  display: grid;
  gap: 0.9rem;
}

.lr-slider-block {
  display: grid;
  gap: 0.35rem;
}

.lr-slider-block label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-navy);
}

.lr-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.lr-mini-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: #fff;
  padding: 0.8rem 0.85rem;
}

.lr-mini-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

.lr-mini-card strong {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.92rem;
  color: var(--c-navy);
}

.lr-rise-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.62;
  color: #475569;
}

.lr-rise-note {
  margin-top: 0.45rem !important;
  color: var(--c-muted);
}

.lr-prediction-card {
  margin-top: 0.85rem;
}

.demo-phone-preview,
.demo-phone-stage {
  width: 154px;
  height: 276px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
  position: relative;
  overflow: hidden;
}

.demo-phone-preview::before,
.demo-phone-stage::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 60px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.tt-preview-stack {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.tt-preview-slab {
  width: 150px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.22), rgba(14, 165, 233, 0.28));
}

.tt-preview-slab-wide {
  width: 170px;
}

.tt-preview-slab-mid {
  width: 132px;
}

.tt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 168px;
  gap: 1rem;
  align-items: center;
}

.tt-signal-list {
  display: grid;
  gap: 0.7rem;
}

.tt-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.tt-card.is-winner {
  border-color: rgba(14, 165, 233, 0.38);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.14);
}

.tt-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tt-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--c-navy);
}

.tt-card-emoji {
  font-size: 1.2rem;
}

.tt-card-meta {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.tt-score-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.tt-signal-row {
  display: grid;
  grid-template-columns: 92px 1fr 40px;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.76rem;
  color: #475569;
}

.tt-signal-track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.tt-signal-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.55), rgba(14, 165, 233, 0.9));
  width: 0%;
}

.tt-phone-screen {
  position: absolute;
  inset: 18px 10px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  overflow: hidden;
}

.tt-phone-topbar {
  position: absolute;
  inset: 0 0 auto;
  padding: 0.9rem 0.8rem 0.55rem;
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.76);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.tt-phone-topbar strong {
  color: #fff;
  border-bottom: 2px solid #fff;
  padding-bottom: 0.15rem;
}

.tt-phone-video {
  position: absolute;
  inset: 2.2rem 0 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at top, rgba(34,211,238,0.28), transparent 28%), linear-gradient(180deg, #0f172a 0%, #111827 100%);
  transition: background 0.32s ease;
}

.tt-phone-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 0.85rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.72) 100%);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.45;
}

.tt-phone-actions {
  position: absolute;
  right: 0.6rem;
  bottom: 3.8rem;
  display: grid;
  gap: 0.45rem;
  color: rgba(255,255,255,0.88);
  font-size: 0.85rem;
}

.tt-phone-placeholder {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.52);
}

.tt-phone-emoji {
  font-size: 2.8rem;
}

.app-tour-shell .demo-stage-preview {
  min-height: 220px;
}

.app-tour-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.app-tour-preview-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.app-tour-preview-card strong {
  display: block;
  font-size: 0.8rem;
  color: var(--c-navy);
}

.app-tour-preview-card span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--c-muted);
}

.app-tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 1rem;
}

.app-tour-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-content: start;
}

.app-tour-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.app-tour-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.app-tour-card:hover,
.app-tour-card:focus-visible {
  border-color: rgba(14, 165, 233, 0.34);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.08);
  transform: translateY(-1px);
}

.app-tour-card.is-active {
  border-color: rgba(14, 165, 233, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.1);
}

.app-tour-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--logo-bg, #f8fafc);
  border: 1px solid var(--logo-border, #e2e8f0);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.app-tour-logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.08));
}

.app-tour-logo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--logo-fallback-color, var(--c-navy));
  background: var(--logo-fallback-bg, transparent);
}

.app-tour-logo.has-fallback img {
  display: none;
}

.app-tour-logo.has-fallback .app-tour-logo-fallback {
  display: grid;
}

.app-tour-card-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;        /* evita desbordamiento en contexto flex */
  overflow: hidden;
}

.app-tour-card-name {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--c-navy);
}

.app-tour-card-desc {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--c-muted);
}

.app-tour-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.96) 100%);
  padding: 1rem 1.05rem;
  min-height: 100%;
}

.app-tour-family-pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(100, 149, 237, 0.10);
  border: 1px solid rgba(100, 149, 237, 0.22);
  color: #6495ED;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Fila superior del detalle: tipo + pill en fila con wrap */
.app-tour-detail-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.3rem;
}

.app-tour-detail-kicker {
  margin: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c-accent);
}

.app-tour-detail-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--c-navy);
}

.app-tour-detail-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.68;
  color: #334155;
}

.app-tour-type-pill {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.18);
  color: #0369a1;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.app-tour-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.app-tour-chip {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 600;
}

.km-cluster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.km-cluster-tag {
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #334155;
}

.km-cluster-tags-live {
  margin-top: 0.85rem;
}

.km-cluster-a {
  border-color: rgba(39, 128, 227, 0.2);
  color: #2780e3;
}

.km-cluster-b {
  border-color: rgba(20, 184, 166, 0.2);
  color: #0f766e;
}

.km-cluster-c {
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.rl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 1rem;
  align-items: start;
}

.rl-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.9rem;
}

.rl-panel-preview {
  max-width: 320px;
}

.rl-panel h5 {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d97706;
}

.rl-metrics {
  display: grid;
  gap: 0.55rem;
}

.rl-metric {
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.rl-metric-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.rl-metric-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-navy);
}

.rl-canvas-frame {
  padding: 0.6rem;
  min-height: auto;
}

.rl-canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Nested concept map ---- */
.concept-shell .demo-stage-preview {
  min-height: 240px;
}

.concept-shell .demo-stage-live {
  padding: 1rem;
}

.concept-preview-stack {
  display: grid;
  gap: 0.65rem;
  width: min(100%, 360px);
}

.concept-preview-layer {
  border-radius: 18px;
  padding: 0.85rem 1rem;
  text-align: left;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.concept-preview-layer:nth-child(2) {
  width: 82%;
  margin-left: auto;
  border-color: #bae6fd;
}

.concept-preview-layer:nth-child(3) {
  width: 62%;
  margin-left: auto;
  border-color: #c7d2fe;
}

.concept-preview-layer strong {
  display: block;
  color: var(--c-navy);
  font-size: 0.88rem;
}

.concept-preview-layer span {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--c-muted);
}

.concept-map-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--c-border);
  background:
    radial-gradient(circle at top left, rgba(39, 128, 227, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.concept-map-stage {
  position: relative;
  height: 320px;
}

.concept-layer {
  position: absolute;
  border: 1px solid transparent;
  border-radius: 28px;
  padding: 1.1rem 1.2rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.concept-layer:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}

.concept-layer:hover {
  transform: translateY(-2px);
}

.concept-layer.is-active {
  transform: translateY(-3px);
}

.concept-layer-ia {
  inset: 0;
  z-index: 1;
  background: #f0f7ff;
  border-color: #dbeafe;
  color: var(--c-navy);
  box-shadow: inset 0 0 0 1px rgba(39, 128, 227, 0.05);
}

.concept-layer-ml {
  top: 72px;
  left: 19%;
  width: 63%;
  height: 166px;
  z-index: 2;
  background: #ecfeff;
  border-color: #bae6fd;
  color: #155e75;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.08);
}

.concept-layer-dl {
  top: 152px;
  left: 41%;
  width: 37%;
  min-height: 108px;
  z-index: 3;
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--c-navy);
  box-shadow: 0 12px 28px rgba(26, 54, 93, 0.1);
}

.concept-layer:not(.is-active) {
  opacity: 0.84;
}

.concept-layer.is-active.concept-layer-ia {
  border-color: rgba(39, 128, 227, 0.55);
  box-shadow: inset 0 0 0 1px rgba(39, 128, 227, 0.1), 0 18px 36px rgba(39, 128, 227, 0.1);
}

.concept-layer.is-active.concept-layer-ml {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.14);
}

.concept-layer.is-active.concept-layer-dl {
  border-color: rgba(26, 54, 93, 0.4);
  box-shadow: 0 18px 36px rgba(26, 54, 93, 0.14);
}

.concept-layer-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.72;
}

.concept-layer-title {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.18rem 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.concept-layer.is-active .concept-layer-title {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.concept-layer-note {
  display: none;
}

.concept-map-hint {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-muted);
}

.concept-panel {
  max-width: 560px;
  margin: 0.9rem auto 0;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--c-border);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.concept-panel[data-tone="ia"] {
  background: #f8fbff;
  border-color: #dbeafe;
}

.concept-panel[data-tone="ml"] {
  background: #f3fcff;
  border-color: #bae6fd;
}

.concept-panel[data-tone="dl"] {
  background: #f8faff;
  border-color: #c7d2fe;
}

.concept-panel-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--c-muted);
}

.concept-panel-title {
  margin: 0.25rem 0 0.45rem;
  font-size: 1.05rem;
  color: var(--c-navy);
}

.concept-panel-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #334155;
}

.concept-panel-label {
  margin-top: 0.8rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.concept-panel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.concept-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.72rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-navy);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.tt-profile-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.tt-profile-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
}

.tt-profile-btn {
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1.5px solid #94a3b8;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  font-family: inherit;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.tt-profile-btn:hover {
  border-color: #6495ED;
  color: #1a365d;
}

.tt-profile-btn.is-active {
  background: rgba(100, 149, 237, 0.12);
  border-color: #6495ED;
  color: #1a365d;
}

@media (max-width: 640px) {
  .lr-live-grid,
  .tt-layout,
  .app-tour-grid,
  .app-tour-preview-grid,
  .rl-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .app-tour-list {
    grid-template-columns: 1fr;
  }

  .lr-metric-grid {
    grid-template-columns: 1fr;
  }

  .tt-card-head {
    align-items: flex-start;
  }

  .tt-signal-row {
    grid-template-columns: 78px 1fr 36px;
  }

  .concept-map-card {
    padding: 0.8rem;
    border-radius: 20px;
  }

  .concept-map-stage {
    height: 350px;
  }

  .concept-layer {
    padding: 0.9rem 1rem;
    border-radius: 22px;
  }

  .concept-layer-ml {
    top: 92px;
    left: 10%;
    width: 76%;
    height: 170px;
  }

  .concept-layer-dl {
    top: 206px;
    left: 22%;
    width: 60%;
    min-height: 104px;
  }

  .concept-layer-title {
    font-size: 0.94rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-tour-card,
  .concept-layer {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .concept-layer:hover,
  .concept-layer.is-active,
  .app-tour-card:hover {
    transform: none !important;
  }
}

/* ================================================
   TIKTOK PREVIEW — populated phone + candidate cards
================================================ */

.tt-preview-layout {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  justify-content: center;
}

.tt-preview-candidates {
  display: grid;
  gap: 0.5rem;
}

.tt-preview-hint {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 0.25rem;
}

.tt-preview-candidate-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  min-width: 152px;
}

.tt-preview-candidate-emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.tt-preview-candidate-label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 500;
  color: #334155;
}

.tt-preview-score-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  border: 1px solid #e2e8f0;
}

/* Phone screen interior — preview state */
.tt-preview-video-area {
  position: absolute;
  inset: 2.2rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.18), transparent 30%),
              linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.tt-preview-video-emoji {
  font-size: 2.2rem;
  opacity: 0.6;
}

.tt-preview-video-msg {
  margin: 0;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  text-align: center;
}

.tt-preview-deciding {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.tt-preview-copy-below {
  margin: 0.85rem auto 0;
  max-width: 40ch;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--c-muted);
  display: block;
}

@media (max-width: 480px) {
  .tt-preview-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .tt-preview-candidates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .tt-preview-candidate-card {
    min-width: 0;
  }
}

/* ============================================================
   INTRO — two-column text + looping phone animation
============================================================ */

.intro-two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  margin: 0.5rem 0 1.5rem;
}

.intro-text-col p {
  line-height: 1.78;
  margin-bottom: 1rem;
}

.intro-text-col p:last-child {
  margin-bottom: 0;
}

.intro-phone-col {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* Phone shell */
.intro-phone-frame {
  width: 155px;
  background: #0f0f0f;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.38),
    0 0 0 2px #2a2a2a,
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}

/* Status bar / topbar — floats over feed */
.intro-phone-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem 0.35rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 600;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

.intro-phone-topbar strong {
  font-size: 0.62rem;
  padding-bottom: 2px;
  border-bottom: 2px solid #fff;
}

/* Feed viewport — clips the scroll animation */
.intro-phone-feed-wrap {
  height: 260px;
  overflow: hidden;
}

/* Animated strip of video items */
.intro-phone-feed {
  display: flex;
  flex-direction: column;
  animation: tt-scroll 20s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .intro-phone-feed { animation-play-state: paused; }
}

/* Single video item */
.intro-feed-item {
  width: 155px;
  height: 260px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.7rem 0.65rem 0.7rem;
}

/* Center emoji */
/* Right-side action icons */
.intro-feed-side {
  position: absolute;
  right: 0.5rem;
  bottom: 2.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
}

/* Bottom caption area */
.intro-feed-info {
  position: relative;
  z-index: 1;
  padding-right: 1.6rem;
}

.intro-feed-user {
  margin: 0 0 0.1rem;
  font-size: 0.61rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

.intro-feed-caption {
  margin: 0;
  font-size: 0.57rem;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.45;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

/* Per-item GIF backgrounds — dark bottom overlay keeps text readable */
.intro-feed-item:nth-child(1) {
  background-image:
    linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%),
    url('../../assets/intro-feed/dance.gif');
  background-size: cover;
  background-position: center;
  background-color: #3b1f7a;
}
.intro-feed-item:nth-child(2) {
  background-image:
    linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%),
    url('../../assets/intro-feed/food.gif');
  background-size: cover;
  background-position: center;
  background-color: #7c2d12;
}
.intro-feed-item:nth-child(3) {
  background-image:
    linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%),
    url('../../assets/intro-feed/soccer.gif');
  background-size: cover;
  background-position: center;
  background-color: #14532d;
}
.intro-feed-item:nth-child(4) {
  background-image:
    linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%),
    url('../../assets/intro-feed/laugh.gif');
  background-size: cover;
  background-position: center;
  background-color: #1e3a5f;
}
.intro-feed-item:nth-child(5) {
  background-image:
    linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.75) 100%),
    url('../../assets/intro-feed/gaming.gif');
  background-size: cover;
  background-position: center;
  background-color: #6b0030;
}

/*
  translateY percentages are relative to the element's own height.
  Feed = 5 items × 260px = 1300px.  -20% = -260px = one item.
*/
@keyframes tt-scroll {
  0%,  17% { transform: translateY(0);    }   /* pause — item 1 */
  20%, 37% { transform: translateY(-20%); }   /* pause — item 2 */
  40%, 57% { transform: translateY(-40%); }   /* pause — item 3 */
  60%, 77% { transform: translateY(-60%); }   /* pause — item 4 */
  80%, 97% { transform: translateY(-80%); }   /* pause — item 5 */
  100%     { transform: translateY(0);    }   /* instant loop reset */
}

@media (max-width: 640px) {
  .intro-two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .intro-phone-col { order: -1; }
}

/* ============================================================
   LEARN LIST — 4-step "how ML learns" vertical sequence
   Numbers mirror .reflexion-num style
============================================================ */

.learn-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.learn-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.learn-num {
  flex-shrink: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--c-primary);
  opacity: 0.22;
  min-width: 2.4rem;
  text-align: right;
  user-select: none;
}

.learn-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.learn-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.learn-caption {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #64748b;
}

.learn-chart {
  flex-shrink: 0;
  display: block;
  width: 180px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

@media (max-width: 700px) {
  .learn-item { flex-wrap: wrap; }
  .learn-chart { width: 100%; max-width: 220px; }
}

/* ============================================================
   SUPERVISED PAIR — two-column regression / classification cards
============================================================ */

.supervised-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.75rem 0;
}

@media (max-width: 600px) {
  .supervised-pair { grid-template-columns: 1fr; }
}

.supervised-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.supervised-card-type {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary);
}

.supervised-card-def {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.supervised-card-examples {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.supervised-card-examples li {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.5;
}

/* ============================================================
   PARADIGM CARDS — 3-column grid with stagger reveal
============================================================ */

.paradigm-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin: 1.75rem 0 2rem;
}

@media (max-width: 680px) {
  .paradigm-cards { grid-template-columns: 1fr; }
}

.paradigm-card {
  border-radius: 16px;
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.paradigm-card:nth-child(2) { transition-delay: 0.12s; }
.paradigm-card:nth-child(3) { transition-delay: 0.24s; }

.paradigm-card-seen {
  background: #eff6ff;
  border: 2px solid var(--c-primary);
}

.paradigm-card-coming {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
}

.paradigm-card-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 0.2em 0.7em;
  align-self: flex-start;
  margin-bottom: 0.1rem;
}

.badge-seen {
  background: var(--c-primary);
  color: #fff;
}

.badge-coming {
  background: #e2e8f0;
  color: #64748b;
}

.paradigm-card-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.paradigm-card-desc {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
}
