/* ============================================================
   driving-time-sense.css — Driving Time Sense guided page
   Poster cards, simulation frames, and article rhythm.
   Follows the row-* article shell; only dts-* classes are new.
   ============================================================ */

/* ---------------- hero: abstract neon backdrop (no photo) ---------------- */
.page-blog-article .bh-hero--article.dts-hero--abstract {
  background-image:
    radial-gradient(ellipse at 84% 4%, rgba(0, 212, 255, 0.18), transparent 46%),
    radial-gradient(ellipse at 0% 100%, rgba(0, 145, 255, 0.14), transparent 44%),
    radial-gradient(ellipse at 60% 55%, rgba(0, 212, 255, 0.05), transparent 55%),
    linear-gradient(152deg, #0d1a33 0%, #081120 52%, #04070f 100%);
}
.page-blog-article .dts-hero--abstract .bh-cinematic-card__shade {
  background: radial-gradient(circle at 78% 30%, rgba(0, 212, 255, 0.08), transparent 36%);
}

/* stat tiles instead of pseudo-button pills */
.page-blog-article .dts-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.page-blog-article .dts-hero-stats .dts-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background: rgba(4, 10, 20, 0.55);
}
.page-blog-article .dts-hero-stats .dts-stat strong {
  color: #7deaff;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.02rem;
  line-height: 1.15;
}
.page-blog-article .dts-hero-stats .dts-stat em {
  font-style: normal;
  color: rgba(196, 208, 224, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* phone compaction: hero copy + video preview should fit the first screen */
@media (max-width: 768px) {
  .page-blog-article .bh-hero--article.dts-hero--abstract .row-article-hero-content {
    padding: 20px 18px 12px;
  }
}
@media (max-width: 480px) {
  .page-blog-article .dts-hero--abstract .row-article-kicker {
    margin-bottom: 8px;
    padding: 5px 9px;
    font-size: 0.56rem;
    letter-spacing: 0.05em;
  }
  .page-blog-article .bh-hero--article.dts-hero--abstract .row-article-hero-content h1 {
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 6.4vw, 1.9rem);
  }
  .page-blog-article .dts-hero--abstract .row-article-dek {
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
  }
  .page-blog-article .dts-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .page-blog-article .dts-hero-stats .dts-stat {
    padding: 6px 10px;
    border-radius: 10px;
    text-align: center;
  }
  .page-blog-article .dts-hero-stats .dts-stat strong {
    font-size: 0.9rem;
  }
  .page-blog-article .dts-hero-stats .dts-stat em {
    font-size: 0.64rem;
  }
  .page-blog-article .dts-hero--abstract .row-article-hero-card--video {
    margin: 8px 12px 12px;
  }
}

/* ---------------- hero: animated tool preview in the hero-card slot
   (same pattern as the Result Sheet Explained page) ---------------- */
.page-blog-article .row-article-hero-card--video {
  padding: 0;
  overflow: hidden;
  border-color: rgba(0, 212, 255, 0.32);
}

.page-blog-article .row-article-hero-card--video video,
.page-blog-article .row-article-hero-card--video img {
  display: block;
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .page-blog-article .row-article-hero-card--video video {
    display: none;
  }
  .page-blog-article .row-article-hero-card--video {
    background:
      #000410
      url('/assets/images/blog/interactive/two-second-rule-stopping-distance-poster.webp')
      center / cover no-repeat;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  /* On phones the preview flows at the foot of the hero instead of floating,
     so it never overlaps the headline. */
  .page-blog-article .row-article-hero-card--video {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 6px 14px 14px;
  }

  .page-blog-article .bh-hero--article:has(.row-article-hero-card--video) {
    min-height: 0;
  }

  .page-blog-article .bh-hero--article:has(.row-article-hero-card--video) .row-article-hero-content {
    padding-bottom: 22px;
  }
}
.dts-quick-note {
  margin: 12px 0 0;
  font-size: 0.92em;
  color: var(--r-text-muted, #94a3b8);
}

.dts-after-note {
  margin-top: 14px;
  padding: 12px 16px;
  border-left: 3px solid rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.06);
  border-radius: 0 10px 10px 0;
  font-size: 0.95em;
}

/* ---------------- simulation blocks ---------------- */

.dts-sim {
  margin: 22px 0 30px;
}

/* Poster: an inviting, quiet card — not an app squeezed into the page */
.dts-poster {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(8, 13, 26, 0.95));
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 16px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.dts-poster:hover,
.dts-poster:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 212, 255, 0.15);
}
.dts-poster:focus-visible {
  outline: 2px solid var(--r-accent, #00d4ff);
  outline-offset: 3px;
}

.dts-poster-copy {
  flex: 1;
  min-width: 0;
}
.dts-poster-copy strong {
  display: block;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.08em;
  margin-bottom: 3px;
}
.dts-poster-copy > span {
  display: block;
  color: var(--r-text-muted, #94a3b8);
  font-size: 0.92em;
  line-height: 1.45;
}

.dts-poster-cta {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00d4ff, #0091ff);
  color: #04121f;
  font-weight: 700;
  font-size: 0.9em;
  white-space: nowrap;
}

/* preview artwork inside the poster (16:9 generated stills, decorative) */
.dts-poster-scene {
  flex: none;
  width: 152px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  background: #000410;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.dts-poster-scene > img,
.dts-poster-scene > video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #000410;
}
/* the still is only a fallback when the animated loop cannot play */
.dts-poster-scene .dts-poster-fallback {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .dts-poster-scene > video {
    display: none;
  }
  .dts-poster-scene .dts-poster-fallback {
    display: block;
  }
}
.dts-scene-road {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 34px;
  transform: translateY(-50%);
  background: #232936;
}
.dts-scene-dash {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #cbd5e1 0 10px, transparent 10px 22px);
  opacity: 0.7;
}
.dts-scene-car {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 26px;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 4px;
  background: #3ddc97;
  box-shadow: 0 0 10px rgba(61, 220, 151, 0.7);
}
.dts-scene-car--lead {
  left: auto;
  right: 14px;
  background: #ffb454;
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.6);
}
.dts-scene-flag {
  position: absolute;
  right: 26px;
  top: 2px;
  color: #ffb454;
  font-size: 15px;
  line-height: 1;
}
.dts-scene-zone {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 3px;
}
.dts-scene-zone--amber {
  left: 44px;
  width: 34px;
  background: rgba(255, 180, 84, 0.30);
  border: 1px solid rgba(255, 180, 84, 0.6);
}
.dts-scene-zone--red {
  left: 80px;
  width: 38px;
  background: rgba(255, 93, 93, 0.28);
  border: 1px solid rgba(255, 93, 93, 0.55);
}
.dts-scene-cross {
  position: absolute;
  inset: 0;
}
.dts-scene-cross::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 26px;
  transform: translateY(-50%);
  background: #232936;
}
.dts-scene-cross-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 26px;
  transform: translateX(-50%);
  background: #232936;
}
.dts-scene-car--vert {
  left: 50%;
  top: auto;
  bottom: 6px;
  transform: translateX(-38%);
  width: 12px;
  height: 24px;
}
.dts-scene-car--crossing {
  left: 12px;
  top: 41%;
  width: 24px;
  height: 11px;
  background: #ffb454;
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.6);
}
.dts-scene-sign {
  position: absolute;
  right: 22px;
  bottom: 10px;
  padding: 1px 3px;
  border-radius: 3px;
  background: #c0392b;
  color: #fff;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.dts-scene-slider {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 8px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.5);
}
.dts-scene-slider::after {
  content: '';
  position: absolute;
  left: 58%;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.9);
}

/* ---------------- live simulation frame ---------------- */

.dts-sim-frame {
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  background: #0b0e13;
}
.dts-sim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 16px;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--r-text-muted, #94a3b8);
}
.dts-sim-close {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: #e0e0e0;
  font: inherit;
  font-size: 0.92em;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.dts-sim-close:hover,
.dts-sim-close:focus-visible {
  border-color: rgba(0, 212, 255, 0.6);
  color: #fff;
}
.dts-sim-loading {
  padding: 42px 16px;
  text-align: center;
  color: var(--r-text-muted, #94a3b8);
  font-size: 0.95em;
}

/* the widget inherits the page's Inter font so it reads as native */
.dts-sim-host .dts-root {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* related-guides section spacing inside this page */
.dts-related {
  margin-top: 34px;
}

@media (max-width: 640px) {
  .dts-poster {
    flex-wrap: wrap;
  }
  .dts-poster-scene {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    order: -1;
  }
  .dts-poster-cta {
    width: 100%;
    text-align: center;
  }
}


/* ---------------- SEO answer blocks and reference data ---------------- */
.dts-search-intro {
  margin: 18px 0 30px;
  color: var(--r-text-muted, #b0bdce);
}
.dts-speed-table-wrap {
  margin: 22px 0 26px;
  padding: 18px;
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 14px;
  background: rgba(8, 15, 28, 0.72);
}
.dts-speed-table-wrap h3 { margin: 0 0 8px; }
.dts-speed-table-wrap > p { margin: 0 0 14px; }
.dts-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dts-speed-table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.dts-speed-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dts-speed-table th,
.dts-speed-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.dts-speed-table thead th {
  color: #dff8ff;
  background: rgba(0, 212, 255, 0.08);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.dts-speed-table tbody th { color: #fff; }
.dts-speed-table tbody td { color: var(--r-text-muted, #b0bdce); }
.dts-table-note { margin: 10px 0 0 !important; font-size: 0.84rem; color: #8fa0b5; }

.dts-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}
.dts-definition-grid > div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
}
.dts-definition-grid strong { display: block; margin-bottom: 5px; color: #fff; }
.dts-definition-grid span { color: var(--r-text-muted, #a8b5c7); font-size: 0.9rem; line-height: 1.45; }

.dts-faq {
  margin-top: 38px;
  scroll-margin-top: 120px;
}
.dts-faq details {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(8, 15, 28, 0.62);
  margin: 10px 0;
  overflow: hidden;
}
.dts-faq summary {
  cursor: pointer;
  padding: 15px 18px;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}
.dts-faq details[open] summary { border-bottom: 1px solid rgba(148, 163, 184, 0.14); }
.dts-faq details p { margin: 0; padding: 14px 18px 18px; color: var(--r-text-muted, #b0bdce); }

@media (max-width: 700px) {
  .dts-definition-grid { grid-template-columns: 1fr; }
  .dts-speed-table-wrap { padding: 14px; margin-inline: -2px; }
}
