/*
 * TFM Training Center — program page (taxonomy "program" archive)
 * /wp-content/themes/blocksy-child/css/tfm-training-program.css
 *
 * Loaded on program pages on top of tfm-training.css (atmosphere, hero,
 * door button, progress bar, countdown, member/guest classes come from there).
 * Colours only from the area variables (--area-accent, --area-accent-soft,
 * --area-accent-glow, --time-bg) with fallbacks.
 *
 * Page states come from the JS as body classes, read from the hidden
 * .tfm-tc-program-state widget:
 *   body.tfm-tc-prog-locked | -not_started | -in_progress | -waiting | -completed
 * Step states come from the hidden .tfm-tc-step-state widget in every loop item:
 *   .tfm-tc-step.is-done | .is-now | .is-ask | .is-waiting | .is-closed (+ .is-repeatable)
 *   (.is-ask = current step whose door first asks the questions of the step before)
 *
 * Contents
 *  1. Markers + layout
 *  2. Notices (locked / logged out)
 *  3. Subject ID card
 *  4. Subject file
 *  5. Protocol (Loop Grid timeline) + step items
 *  6. Reset button + dialog
 *  7. Questions overlay + "Complete program"
 *  8. Responsive + reduced motion
 */

/* ============================================================
   1. MARKERS + LAYOUT
   ============================================================ */

/* state widgets are data only; in the editor they stay visible as a hint */
body:not(.elementor-editor-active) .tfm-tc-program-state,
body:not(.elementor-editor-active) .tfm-tc-step-state {
  display: none !important;
}

/* Container .tfm-tc-prog-cols: sidebar | protocol */
.tfm-tc-prog-cols.e-con-full,
.tfm-tc-prog-cols.e-con-boxed > .e-con-inner {
  display: grid !important;
  grid-template-columns: 330px minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
}
.tfm-tc-prog-cols > .e-con,
.tfm-tc-prog-cols > .e-con-inner > .e-con {
  width: 100% !important;
  min-width: 0 !important;
}

/* Container .tfm-tc-prog-side: stays in view while the protocol scrolls */
.tfm-tc-prog-side {
  position: sticky !important;
  top: 24px;
  gap: 26px !important;
}
body.admin-bar .tfm-tc-prog-side {
  top: 56px;
}

body.tfm-tc-prog-locked .tfm-tc-prog-cols {
  opacity: 0.4;
  filter: grayscale(0.9);
  pointer-events: none;
}

/* Crumb above the hero title: Button widget .tfm-tc-crumb */
.tfm-tc-crumb .elementor-button {
  padding: 4px 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-crumb .elementor-button * {
  color: inherit !important;
  fill: currentColor !important;
}
.tfm-tc-crumb .elementor-button:hover {
  color: var(--ink, #f6f1ea) !important;
}

/* ============================================================
   2. NOTICES — container .tfm-tc-notice (+ --locked)
   The locked notice only shows while the program is locked.
   For the logged-out notice add .tfm-tc-guest (tfm-training.css).
   ============================================================ */

.tfm-tc-notice {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 20px 24px;
  border-radius: 12px !important;
  border: 1px dashed color-mix(in srgb, var(--area-accent, #cc3355) 45%, transparent) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 7%, rgba(0, 0, 0, 0.3)) !important;
}
body:not(.elementor-editor-active):not(.tfm-tc-prog-locked) .tfm-tc-notice--locked {
  display: none !important;
}
.tfm-tc-notice > .elementor-element,
.tfm-tc-notice > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tc-notice-icon {
  flex-shrink: 0;
  width: 34px;
  height: 46px;
  color: var(--area-accent-soft, #e06080);
}
.tfm-tc-notice-title,
.tfm-tc-notice-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  color: var(--ink, #f6f1ea) !important;
  margin: 0 !important;
}
.tfm-tc-notice-text,
.tfm-tc-notice-text * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.92rem !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-notice-text p {
  margin: 0 !important;
}

/* ============================================================
   3. SUBJECT ID CARD — container .tfm-tc-idcard
   ============================================================ */

.tfm-tc-idcard {
  position: relative !important;
  overflow: hidden !important;
  padding: 18px;
  gap: 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--area-accent, #cc3355) 16%, #1b1015), #120a0e) !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 35%, transparent) !important;
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.9), 0 0 40px -22px var(--area-accent-glow, rgba(204, 51, 85, 0.4)) !important;
}
/* faint diagonal pattern, inserted by the JS as a real element */
.tfm-tc-id-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 8px);
}
.tfm-tc-idcard > .elementor-element,
.tfm-tc-idcard > .e-con-inner > .elementor-element {
  position: relative;
  z-index: 1;
}

/* Header row: container .tfm-tc-id-top with two text widgets */
.tfm-tc-id-top {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.tfm-tc-id-top > .elementor-element,
.tfm-tc-id-top > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tc-id-top,
.tfm-tc-id-top * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.26em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-id-top p {
  margin: 0 !important;
}

/* Body row: container .tfm-tc-id-body = photo | text */
.tfm-tc-id-body {
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
}
.tfm-tc-id-body > .elementor-element,
.tfm-tc-id-body > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
}
.tfm-tc-id-body > .e-con,
.tfm-tc-id-body > .e-con-inner > .e-con {
  flex: 1 1 auto !important;
  width: auto !important;
  gap: 2px !important;
}

/* Image widget .tfm-tc-id-avatar (Dynamic Tag: User Profile Picture) */
.tfm-tc-id-avatar {
  flex: 0 0 76px !important;
  width: 76px !important;
}
.tfm-tc-id-avatar img {
  display: block;
  width: 76px !important;
  height: 94px !important;
  object-fit: cover;
  border-radius: 6px !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 40%, transparent) !important;
  filter: grayscale(0.6) contrast(1.1);
}

/* Heading .tfm-tc-id-name (Dynamic Tag: User Info → Display Name) */
.tfm-tc-id-name,
.tfm-tc-id-name * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  color: var(--ink, #f6f1ea) !important;
}

/* Text widgets .tfm-tc-id-line ("Subject No." / "Admitted" / …).
   The value comes from the Dynamic Tag, the label from its "Before" setting;
   wrap the value in <b> is not possible there, so the whole line is one style. */
.tfm-tc-id-line,
.tfm-tc-id-line * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.72rem !important;
  line-height: 1.6 !important;
  color: var(--muted, #b6afc7) !important;
  font-variant-numeric: tabular-nums;
}
.tfm-tc-id-line p {
  margin: 0 !important;
}

/* Barcode, inserted by the JS at the end of the card */
.tfm-tc-barcode {
  position: relative;
  z-index: 1;
  height: 26px;
  opacity: 0.75;
  background: repeating-linear-gradient(90deg,
    var(--ink, #f6f1ea) 0 2px, transparent 2px 4px,
    var(--ink, #f6f1ea) 4px 5px, transparent 5px 9px,
    var(--ink, #f6f1ea) 9px 12px, transparent 12px 14px);
}

/* ============================================================
   4. SUBJECT FILE — container .tfm-tc-file
   ============================================================ */

.tfm-tc-file {
  position: relative !important;
  overflow: visible !important;
  padding: 22px 22px 20px;
  gap: 14px !important;
  border-radius: 4px 14px 14px 14px !important;
  background: linear-gradient(180deg, rgba(30, 14, 22, 0.92), rgba(14, 8, 12, 0.96)) !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 26%, transparent) !important;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.35), 0 24px 50px -28px rgba(0, 0, 0, 0.9) !important;
}

/* Text widget .tfm-tc-file-tab ("Confidential") sits on the top edge */
.tfm-tc-file-tab {
  position: absolute !important;
  top: -27px;
  left: -1px;
  width: auto !important;
  margin: 0 !important;
}
.tfm-tc-file-tab .elementor-widget-container {
  padding: 5px 14px;
  border-radius: 8px 8px 0 0;
  background: #1c0e15;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 26%, transparent);
  border-bottom: 0;
}
.tfm-tc-file-tab,
.tfm-tc-file-tab * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-file-tab p {
  margin: 0 !important;
}

/* Head row: container .tfm-tc-file-head = title | stamp */
.tfm-tc-file-head {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
}
.tfm-tc-file-head > .elementor-element,
.tfm-tc-file-head > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tc-file-title,
.tfm-tc-file-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.55rem !important;
  font-weight: 600 !important;
  color: var(--ink, #f6f1ea) !important;
  margin: 0 !important;
}

/* Stamps: text widgets .tfm-tc-stamp + --run ("In training") / --done ("Completed") */
.tfm-tc-stamp .elementor-widget-container {
  display: inline-block;
  padding: 4px 10px;
  border: 3px double var(--area-accent, #cc3355);
  transform: rotate(-7deg);
  opacity: 0.9;
}
.tfm-tc-stamp,
.tfm-tc-stamp * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.24em !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-stamp p {
  margin: 0 !important;
}
body:not(.elementor-editor-active):not(.tfm-tc-prog-completed) .tfm-tc-stamp--done,
body.tfm-tc-prog-completed .tfm-tc-stamp--run {
  display: none !important;
}

/* Rows: container .tfm-tc-kv-row = label | value */
.tfm-tc-kv-row {
  flex-direction: row !important;
  align-items: baseline !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
}
.tfm-tc-kv-label {
  flex: 0 0 96px !important;
  width: 96px !important;
}
.tfm-tc-kv-value {
  flex: 1 1 auto !important;
  width: auto !important;
}
.tfm-tc-kv-label,
.tfm-tc-kv-label * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-kv-value,
.tfm-tc-kv-value * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.15rem !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tc-kv-value .elementor-widget-container {
  padding-bottom: 5px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.12);
}
.tfm-tc-kv-label p,
.tfm-tc-kv-value p {
  margin: 0 !important;
}
.tfm-tc-kv-value em {
  color: var(--area-accent-soft, #e06080) !important;
}

/* Observation note: container .tfm-tc-obs with text widgets
   .tfm-tc-obs-label and .tfm-tc-obs-text. Hidden by the JS when empty. */
.tfm-tc-obs {
  padding: 14px 16px;
  gap: 4px !important;
  border-radius: 8px !important;
  background: #e9e1d3 !important;
  transform: rotate(-0.6deg);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8) !important;
}
.tfm-tc-obs.is-empty {
  display: none !important;
}
.tfm-tc-obs-label,
.tfm-tc-obs-label * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.58rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: rgba(42, 31, 34, 0.6) !important;
}
.tfm-tc-obs-text,
.tfm-tc-obs-text * {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 1.05rem !important;
  line-height: 1.45 !important;
  color: #2a1f22 !important;
}
.tfm-tc-obs-label p,
.tfm-tc-obs-text p {
  margin: 0 !important;
}

/* ============================================================
   5. PROTOCOL — Loop Grid .tfm-tc-protocol (1 column)
   Loop Item root container: .tfm-tc-step
   ============================================================ */

.tfm-tc-protocol .elementor-loop-container {
  position: relative;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
}
/* the glowing line behind the nodes */
.tfm-tc-protocol .elementor-loop-container::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--area-accent, #cc3355), color-mix(in srgb, var(--area-accent, #cc3355) 20%, transparent) 55%, rgba(255, 255, 255, 0.06));
}

.tfm-tc-step {
  position: relative !important;
  padding-left: 54px;
}

/* Node: text widget .tfm-tc-step-node (Dynamic Tag: Schritt – Nummer) */
.tfm-tc-step-node {
  position: absolute !important;
  left: 0;
  top: 14px;
  width: 36px !important;
  margin: 0 !important;
}
.tfm-tc-step-node .elementor-widget-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #140a0f;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 40%, transparent);
}
.tfm-tc-step-node,
.tfm-tc-step-node * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-step-node p {
  margin: 0 !important;
}
.tfm-tc-step.is-done .tfm-tc-step-node .elementor-widget-container {
  background: var(--area-accent, #cc3355);
  border-color: var(--area-accent, #cc3355);
  box-shadow: 0 0 14px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
  font-size: 0 !important;
}
.tfm-tc-step.is-done .tfm-tc-step-node .elementor-widget-container * {
  display: none !important;
}
.tfm-tc-step.is-done .tfm-tc-step-node .elementor-widget-container::after {
  content: '\2713';
  font-size: 0.9rem;
  color: #ffffff;
}
.tfm-tc-step.is-now .tfm-tc-step-node .elementor-widget-container,
.tfm-tc-step.is-ask .tfm-tc-step-node .elementor-widget-container,
.tfm-tc-step.is-waiting .tfm-tc-step-node .elementor-widget-container {
  border: 2px solid var(--area-accent-soft, #e06080);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--area-accent, #cc3355) 18%, transparent), 0 0 22px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
  animation: tfmTcNodePulse 2.6s ease-in-out infinite;
}
.tfm-tc-step.is-now .tfm-tc-step-node *,
.tfm-tc-step.is-ask .tfm-tc-step-node *,
.tfm-tc-step.is-waiting .tfm-tc-step-node * {
  color: var(--ink, #f6f1ea) !important;
}
@keyframes tfmTcNodePulse {
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--area-accent, #cc3355) 8%, transparent), 0 0 26px var(--area-accent-glow, rgba(204, 51, 85, 0.4)); }
}
.tfm-tc-step.is-closed .tfm-tc-step-node .elementor-widget-container {
  border-style: dashed;
}

/* Card: container .tfm-tc-step-card */
.tfm-tc-step-card {
  padding: 16px 20px;
  gap: 6px !important;
  border-radius: 12px !important;
  background: rgba(20, 10, 15, 0.82) !important;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 18%, transparent) !important;
  transition: border-color 0.3s ease;
}
.tfm-tc-step.is-closed .tfm-tc-step-card {
  opacity: 0.6;
}
.tfm-tc-step.is-now .tfm-tc-step-card,
.tfm-tc-step.is-ask .tfm-tc-step-card,
.tfm-tc-step.is-waiting .tfm-tc-step-card {
  border-color: color-mix(in srgb, var(--area-accent, #cc3355) 55%, transparent) !important;
  box-shadow: 0 0 40px -18px var(--area-accent-glow, rgba(204, 51, 85, 0.4)) !important;
}

/* Top row: container .tfm-tc-step-top = title (+ repeatable) | chip */
.tfm-tc-step-top {
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
}
.tfm-tc-step-top > .elementor-element,
.tfm-tc-step-top > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tc-step-top > .tfm-tc-step-title,
.tfm-tc-step-top > .e-con-inner > .tfm-tc-step-title {
  flex-grow: 1 !important;
}

/* Heading .tfm-tc-step-title (Dynamic Tag: Schritt – Titel) */
.tfm-tc-step-title,
.tfm-tc-step-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tc-step.is-now .tfm-tc-step-title *,
.tfm-tc-step.is-ask .tfm-tc-step-title *,
.tfm-tc-step.is-waiting .tfm-tc-step-title * {
  font-size: 1.7rem !important;
}
/* the black bar of a closed title */
.tfm-tc-redact {
  display: inline-block;
  width: var(--w, 140px);
  max-width: 100%;
  height: 0.9em;
  vertical-align: -2px;
  border-radius: 2px;
  background: #050304;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Text widget .tfm-tc-step-chip (Dynamic Tag: Schritt – Status-Text) */
.tfm-tc-step-chip .elementor-widget-container {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 35%, transparent);
}
.tfm-tc-step-chip,
.tfm-tc-step-chip * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-step-chip p {
  margin: 0 !important;
}

/* "Repeatable": text widget .tfm-tc-step-rep, only on completed repeatable steps */
.tfm-tc-step-rep,
.tfm-tc-step-rep * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.6rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-step-rep p {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
}
.tfm-tc-rep-icon {
  width: 13px;
  height: 13px;
  color: var(--area-accent-soft, #e06080);
}
body:not(.elementor-editor-active) .tfm-tc-step:not(.is-repeatable) .tfm-tc-step-rep,
body:not(.elementor-editor-active) .tfm-tc-step:not(.is-done) .tfm-tc-step-rep {
  display: none !important;
}

/* "Your answer": text widget .tfm-tc-step-answer (hidden when empty) */
.tfm-tc-step-answer,
.tfm-tc-step-answer * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.78rem !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-step-answer p {
  margin: 0 !important;
}
.tfm-tc-step-answer.is-empty {
  display: none !important;
}

/* "Do it again": Button .tfm-tc-step-again (Link: Schritt – Link) */
.tfm-tc-step-again .elementor-button {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.66rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-step-again .elementor-button * {
  color: inherit !important;
  fill: currentColor !important;
}
.tfm-tc-step-again .elementor-button-icon {
  transition: transform 0.5s ease;
}
.tfm-tc-step-again .elementor-button:hover .elementor-button-icon {
  transform: rotate(-180deg);
}
.tfm-tc-step-again .elementor-button:hover {
  color: var(--ink, #f6f1ea) !important;
}
body:not(.elementor-editor-active) .tfm-tc-step:not(.is-repeatable) .tfm-tc-step-again,
body:not(.elementor-editor-active) .tfm-tc-step:not(.is-done) .tfm-tc-step-again {
  display: none !important;
}

/* "Now" block: container .tfm-tc-step-now = image | body.
   Only on the current step (open or waiting). */
body:not(.elementor-editor-active) .tfm-tc-step:not(.is-now):not(.is-ask):not(.is-waiting) .tfm-tc-step-now {
  display: none !important;
}
.tfm-tc-step-now {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
  margin-top: 8px;
}
.tfm-tc-step-img {
  flex: 0 0 200px !important;
  width: 200px !important;
}
.tfm-tc-step-img img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 160px;
  object-fit: cover;
  border-radius: 8px !important;
}
.tfm-tc-step-now > .e-con,
.tfm-tc-step-now > .e-con-inner > .e-con {
  flex: 1 1 auto !important;
  width: auto !important;
}
/* Text widget .tfm-tc-step-intro (ACF: introduction) */
.tfm-tc-step-intro,
.tfm-tc-step-intro * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.1rem !important;
  line-height: 1.55 !important;
  color: var(--body-text, #e4ddf0) !important;
}
.tfm-tc-step-intro p:last-child {
  margin-bottom: 0 !important;
}

/* Actions: container .tfm-tc-step-act = Continue button | waiting countdown */
.tfm-tc-step-act {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 18px !important;
}
.tfm-tc-step-act > .elementor-element,
.tfm-tc-step-act > .e-con-inner > .elementor-element,
.tfm-tc-step-act > .e-con,
.tfm-tc-step-act > .e-con-inner > .e-con {
  flex-grow: 0 !important;
  width: auto !important;
}
body:not(.elementor-editor-active) .tfm-tc-step.is-waiting .tfm-tc-step-go,
body:not(.elementor-editor-active) .tfm-tc-step.is-now .tfm-tc-step-wait,
body:not(.elementor-editor-active) .tfm-tc-step.is-ask .tfm-tc-step-wait {
  display: none !important;
}
/* Container .tfm-tc-step-wait = label "Opens in" + Countdown widget */
.tfm-tc-step-wait {
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 12px !important;
}
.tfm-tc-step-wait > .elementor-element,
.tfm-tc-step-wait > .e-con-inner > .elementor-element {
  flex-grow: 0 !important;
  width: auto !important;
}
.tfm-tc-step-wait-label,
.tfm-tc-step-wait-label * {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-step-wait-label p {
  margin: 0 !important;
}

/* ============================================================
   6. RESET — Button .tfm-tc-reset + dialog (built by the JS)
   ============================================================ */

.tfm-tc-reset .elementor-button {
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 2px;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.64rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
  opacity: 0.75;
}
.tfm-tc-reset .elementor-button * {
  color: inherit !important;
  fill: currentColor !important;
}
.tfm-tc-reset .elementor-button:hover,
.tfm-tc-reset .elementor-button:focus-visible {
  opacity: 1;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tc-reset .elementor-button:focus-visible {
  outline: 2px solid var(--area-accent-soft, #e06080) !important;
  outline-offset: 3px;
}
body:not(.elementor-editor-active):not(.logged-in) .tfm-tc-reset,
body.tfm-tc-prog-locked .tfm-tc-reset,
body.tfm-tc-prog-not_started .tfm-tc-reset {
  display: none !important;
}

.tfm-tc-dialog {
  width: min(440px, calc(100% - 32px));
  max-width: none;
  padding: 26px 26px 22px;
  border-radius: 14px;
  border: 1px solid var(--area-accent, #cc3355);
  background: #120a0e;
  color: var(--body-text, #e4ddf0);
  box-shadow: 0 0 70px -10px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
}
.tfm-tc-dialog::backdrop {
  background: rgba(4, 2, 3, 0.82);
  backdrop-filter: blur(4px);
}
.tfm-tc-dialog h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink, #f6f1ea);
}
.tfm-tc-dialog p,
.tfm-tc-dialog ul {
  margin: 10px 0 0;
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted, #b6afc7);
}
.tfm-tc-dialog ul {
  padding-left: 1.1em;
}
.tfm-tc-dialog li::marker {
  color: var(--area-accent-soft, #e06080);
}
.tfm-tc-dialog b {
  color: var(--ink, #f6f1ea);
  font-weight: 500;
}
.tfm-tc-dialog-error {
  color: var(--area-accent-soft, #e06080) !important;
}
.tfm-tc-dialog-act {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
/* the theme styles <button> globally, hence !important */
.tfm-tc-dialog-act button {
  min-height: 42px !important;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  cursor: pointer;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}
.tfm-tc-dialog-cancel {
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: none !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tc-dialog-confirm {
  border: 1px solid var(--area-accent, #cc3355) !important;
  background: var(--area-accent, #cc3355) !important;
  color: #ffffff !important;
}
.tfm-tc-dialog-confirm[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.tfm-tc-dialog-act button:focus-visible {
  outline: 2px solid var(--area-accent-soft, #e06080) !important;
  outline-offset: 3px;
}

/* ============================================================
   7. QUESTIONS OVERLAY + "COMPLETE PROGRAM"
   ============================================================ */

/* Container .tfm-tc-finish (above the protocol): only when all steps are
   done and the program is not completed yet. Button inside: .tfm-tc-finish-btn */
body:not(.elementor-editor-active):not(.tfm-tc-prog-finish) .tfm-tc-finish {
  display: none !important;
}
.tfm-tc-finish {
  padding: 22px 24px;
  gap: 8px !important;
  border-radius: 12px !important;
  border: 1px dashed color-mix(in srgb, var(--area-accent, #cc3355) 55%, transparent) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 7%, rgba(20, 10, 15, 0.85)) !important;
  box-shadow: 0 0 40px -18px var(--area-accent-glow, rgba(204, 51, 85, 0.4)) !important;
}
.tfm-tc-finish-title,
.tfm-tc-finish-title * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  color: var(--ink, #f6f1ea) !important;
  margin: 0 !important;
}
.tfm-tc-finish-text,
.tfm-tc-finish-text * {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.1rem !important;
  color: var(--body-text, #e4ddf0) !important;
}
.tfm-tc-finish-text p {
  margin: 0 !important;
}

/* the overlay itself (built by the JS) */
.tfm-tc-ask {
  width: min(560px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--area-accent, #cc3355);
  background: #120a0e;
  color: var(--body-text, #e4ddf0);
  box-shadow: 0 0 90px -10px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
}
.tfm-tc-ask::backdrop {
  background: rgba(4, 2, 3, 0.88);
  backdrop-filter: blur(5px);
}
.tfm-tc-ask-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Jost', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--area-accent-soft, #e06080);
}
.tfm-tc-ask-dots {
  display: flex;
  gap: 6px;
}
.tfm-tc-ask-dots i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}
.tfm-tc-ask-dots i.is-on {
  background: var(--area-accent-soft, #e06080);
  box-shadow: 0 0 8px var(--area-accent-glow, rgba(204, 51, 85, 0.4));
}
.tfm-tc-ask-body {
  padding: 26px 24px 24px;
}
.tfm-tc-ask h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink, #f6f1ea);
}
.tfm-tc-ask-about {
  margin: 6px 0 18px;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  color: var(--muted, #b6afc7);
}
/* the theme styles <button> globally, hence !important */
.tfm-tc-ask-opt {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px !important;
  padding: 14px 16px !important;
  border-radius: 10px !important;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.15rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ink, #f6f1ea) !important;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.tfm-tc-ask-opt::before {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--muted, #b6afc7);
}
.tfm-tc-ask-opt:hover {
  border-color: color-mix(in srgb, var(--area-accent, #cc3355) 60%, transparent) !important;
}
.tfm-tc-ask-opt[aria-checked="true"] {
  border-color: var(--area-accent, #cc3355) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 14%, transparent) !important;
}
.tfm-tc-ask-opt[aria-checked="true"]::before {
  border: 4px solid var(--area-accent-soft, #e06080);
}
.tfm-tc-ask-act {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.tfm-tc-ask-later {
  min-height: 40px !important;
  padding: 6px 2px !important;
  border: 0 !important;
  background: none !important;
  cursor: pointer;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.64rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--muted, #b6afc7) !important;
}
.tfm-tc-ask-next,
.tfm-tc-ask-ok {
  min-height: 46px !important;
  padding: 12px 24px !important;
  border-radius: 999px !important;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--area-accent, #cc3355) 50%, transparent) !important;
  background: color-mix(in srgb, var(--area-accent, #cc3355) 18%, transparent) !important;
  font-family: 'Jost', sans-serif !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--ink, #f6f1ea) !important;
}
.tfm-tc-ask-next[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.tfm-tc-ask-opt:focus-visible,
.tfm-tc-ask-later:focus-visible,
.tfm-tc-ask-next:focus-visible,
.tfm-tc-ask-ok:focus-visible {
  outline: 2px solid var(--area-accent-soft, #e06080) !important;
  outline-offset: 2px;
}
.tfm-tc-ask.is-busy .tfm-tc-ask-body {
  opacity: 0.6;
  pointer-events: none;
}
.tfm-tc-ask-result {
  display: none;
  padding: 40px 24px 34px;
  text-align: center;
}
.tfm-tc-ask-result p {
  margin: 8px 0 20px;
  font-family: 'Jost', sans-serif;
  color: var(--muted, #b6afc7);
}
.tfm-tc-ask.is-done .tfm-tc-ask-body {
  display: none;
}
.tfm-tc-ask.is-done .tfm-tc-ask-result {
  display: block;
}

/* ============================================================
   8. RESPONSIVE + REDUCED MOTION
   ============================================================ */

@media (max-width: 1024px) {
  .tfm-tc-prog-cols.e-con-full,
  .tfm-tc-prog-cols.e-con-boxed > .e-con-inner {
    grid-template-columns: 1fr !important;
  }
  .tfm-tc-prog-side {
    position: static !important;
  }
}

/* Phones: crumb and small text buttons get 44px tap areas, the tiny
   labels (ID card, file tab, step chips) readable sizes. Shared with the
   step and TV pages, which load this file too. */
@media (max-width: 767px) {
  .tfm-tc-crumb .elementor-button,
  .tfm-tc-step-again .elementor-button {
    padding: 14px 0;
  }
  .tfm-tc-crumb .elementor-button {
    font-size: 0.76rem !important;
  }
  .tfm-tc-step-again .elementor-button {
    font-size: 0.72rem !important;
  }
  .tfm-tc-reset .elementor-button {
    padding: 13px 2px;
    font-size: 0.72rem !important;
  }
  .tfm-tc-id-top,
  .tfm-tc-id-top *,
  .tfm-tc-file-tab,
  .tfm-tc-file-tab *,
  .tfm-tc-step-chip,
  .tfm-tc-step-chip * {
    font-size: 0.68rem !important;
  }
}

@media (max-width: 640px) {
  .tfm-tc-step-now {
    flex-direction: column !important;
  }
  .tfm-tc-step-img {
    flex-basis: auto !important;
    width: 100% !important;
  }
  .tfm-tc-step-img img {
    min-height: 120px;
    max-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfm-tc-step-node .elementor-widget-container,
  .tfm-tc-step-again .elementor-button-icon {
    animation: none !important;
    transition: none !important;
  }
}
