/*
 * Ley Karin demo walkthrough (/canal-de-denuncias/demo-ley-karin, DemoTourView +
 * demo-walkthrough.js). Builds on trial-landing.css (header, sections, buttons, the "shot" frame).
 */
.dw { padding: 1.5rem 0 2.5rem; background: #fafaf9; border-bottom: 1px solid var(--ink-200); }
.dw-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1.25rem; }

/* Title, notice and chapters */
.dw-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dw-heading .section-label { margin-bottom: 0.375rem; }
.dw-h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.015em; color: var(--ink-900); margin: 0 0 0.625rem; }
.dt-notice { display: inline-block; font-size: 0.8125rem; color: #78350f; background: #fffbeb; border: 1px solid #fde68a; border-radius: 3px; padding: 0.375rem 0.625rem; margin: 0; }
.dw-chapters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.dw-chapter { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; border: 1px solid var(--ink-200); border-radius: 999px; background: #ffffff; font-size: 0.875rem; font-weight: 600; color: var(--ink-700); cursor: pointer; }
.dw-chapter:hover { border-color: var(--brand-400); }
.dw-chapter.is-active { border-color: var(--brand-700); background: var(--brand-50); color: var(--brand-800); }
.dw-chapter.is-done { color: var(--ink-500); }
.dw-chapter-num { display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--ink-100); font-size: 0.75rem; }
.dw-chapter.is-active .dw-chapter-num { background: var(--brand-700); color: #ffffff; }
.dw-progress { font-size: 0.8125rem; color: var(--ink-500); margin-left: 0.25rem; }

/* The screen */
.dw-frame { position: relative; }
/* The address stays on one line, so the frame keeps its height on a phone. */
.dw-frame .tl-addr { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dw-viewport { position: relative; height: min(78vh, 50rem); min-height: 30rem; overflow: hidden; background: #ffffff; }
.dw-iframe { display: block; width: 100%; height: 100%; border: 0; }
/* During the tour the screens are view-only: the visitor's clicks never change them under a callout. */
.dw-viewport.is-guided .dw-iframe { pointer-events: none; }
.dw-pdf { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; text-align: center; background: #ffffff; color: var(--ink-700); }
/* The case-file card is the whole screen: no dimming around its button. */
.dw-viewport.is-pdf .dw-hole { box-shadow: 0 0 0 3px var(--brand-500); }
.dw-pdf[hidden] { display: none; }

/* Spotlight: a frame around the element; everything else dimmed. It never takes clicks. */
.dw-hole { position: absolute; z-index: 20; border-radius: 6px; box-shadow: 0 0 0 3px var(--brand-500), 0 0 0 9999px rgba(28, 25, 23, 0.42); pointer-events: none; transition: all 0.25s ease; }
.dw-hole[hidden] { display: none; }

/* The callout: one at a time, next to its element (docked at the bottom on narrow screens). */
.dw-callout { position: absolute; z-index: 30; width: 20rem; max-width: calc(100% - 1.5rem); background: #ffffff; border-radius: 6px; padding: 1rem 1rem 0.75rem; box-shadow: 0 12px 32px -8px rgba(28, 25, 23, 0.45); transition: top 0.25s ease, left 0.25s ease; }
.dw-callout[hidden] { display: none; }
.dw-callout-step { margin: 0 0 0.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-700); }
.dw-callout-title { margin: 0 0 0.375rem; font-size: 1.0625rem; font-weight: 700; color: var(--ink-900); padding-right: 1.5rem; }
.dw-callout-text { margin: 0 0 0.875rem; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-700); }
.dw-callout-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.dw-close { position: absolute; top: 0.375rem; right: 0.5rem; width: 2rem; height: 2rem; border: 0; background: none; font-size: 1.25rem; line-height: 1; color: var(--ink-500); cursor: pointer; }
.dw-close:hover { color: var(--ink-900); }
.dw-link { border: 0; background: none; padding: 0; font-size: 0.875rem; color: var(--brand-700); text-decoration: underline; cursor: pointer; }
.dw-link[disabled] { visibility: hidden; }

/* Intro, fork and end overlays over the screen */
.dw-modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(28, 25, 23, 0.5); }
.dw-modal[hidden] { display: none; }
.dw-modal-box { width: 100%; max-width: 28rem; background: #ffffff; border-radius: 6px; padding: 1.75rem; text-align: center; box-shadow: 0 24px 48px -16px rgba(28, 25, 23, 0.5); }
.dw-modal-title { margin: 0 0 0.5rem; font-size: 1.375rem; font-weight: 800; color: var(--ink-900); }
.dw-modal-text, .dw-modal-price { margin: 0 0 1.25rem; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-600); }
.dw-modal-actions { display: flex; flex-direction: column; align-items: center; gap: 0.875rem; }
.dw-modal-next { margin: 0; max-width: 22rem; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-500); }
.dw-modal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }

.dw-resume { margin-top: 0.875rem; }
.dw-resume[hidden] { display: none; }

.dt-cta { text-align: center; }
.dt-cta .tl-h2 { margin-bottom: 0.75rem; }
.dt-cta .tl-step-text { margin-bottom: 1.5rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 767px) {
    .dw { padding-top: 1rem; }
    /* The frame (bar + screen) fits under the 4rem header; the script scrolls it into place. */
    .dw-viewport { height: calc(100vh - 6.5rem); height: calc(100dvh - 6.5rem); min-height: 24rem; }
    .dw-callout.is-docked { left: 0.75rem !important; right: 0.75rem; bottom: 0.75rem; top: auto !important; width: auto; max-width: none; }
    .dw-progress { width: 100%; margin-left: 0; }
    /* The callout docks at the bottom: cards and the case file sit at the top of the frame, and
       the notice above the frame is left to the band each demo screen carries. */
    .dw-modal { align-items: flex-start; padding-top: 1.25rem; }
    .dw-pdf { justify-content: flex-start; padding-top: 2.5rem; }
    .dw-top .dt-notice { display: none; }
    .dw-h1 { font-size: 1.375rem; margin-bottom: 0.5rem; }
    .dw-chapter { padding: 0.3rem 0.625rem; font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
    .dw-hole, .dw-callout { transition: none; }
}
