/* ============================================
   DEFLATE Risk Assessment page
   Loaded only on deflate-risk-assessment.html
   ============================================ */

:root {
  --dfl-ice: #EEF2FD;
  --dfl-ice-deep: #E2E9FB;
  --dfl-text: #2a3454;
  --dfl-muted: #4d5a7a;
  --dfl-line: rgba(6, 25, 79, 0.1);
  --dfl-focus: #9FD1FF;
}

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

/* ---- Header ---- */
.dfl-header {
  padding: 11rem 0 5rem;
}

.dfl-header__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* ---- Section rhythm (tighter than the marketing pages) ---- */
.dfl-overview,
.dfl-review,
.dfl-limits,
.dfl-refs {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

/* ---- Overview ---- */
.dfl-overview__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.dfl-overview__lead {
  color: var(--navy);
  max-width: 20ch;
}

.dfl-overview__text {
  color: var(--dfl-text);
  margin-top: 1.75rem;
  max-width: 60ch;
}

.dfl-overview__side {
  padding-top: 0.5rem;
}

.dfl-overview__side .body-md {
  color: var(--dfl-text);
}

.dfl-overview__heading {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.875rem;
}

.dfl-mechanisms {
  display: grid;
  gap: 0.625rem;
  margin-bottom: 2.25rem;
}

.dfl-mechanisms li {
  position: relative;
  padding: 1rem 1.25rem 1rem 3rem;
  border-radius: 16px;
  background: var(--dfl-ice);
  color: var(--dfl-text);
  line-height: 1.5;
}

.dfl-mechanisms li::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 1.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--blue);
}

.dfl-mechanisms strong {
  color: var(--navy);
  font-weight: 700;
}

/* ---- Review section ---- */
.dfl-review {
  background: var(--dfl-ice);
  scroll-margin-top: 5rem;
}

.dfl-review__intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 3rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.dfl-review__intro h2 {
  color: var(--navy);
}

.dfl-review__intro p {
  color: var(--dfl-muted);
  max-width: 44ch;
}

/* ---- Tool shell ---- */
.dfl-tool {
  scroll-margin-top: 6rem;
  display: grid;
  grid-template-columns: minmax(300px, 38%) 1fr;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(6, 25, 79, 0.14), 0 2px 8px rgba(6, 25, 79, 0.05);
}

.dfl-tool__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  border-radius: 28px 0 0 28px;
  color: #ffffff;
  background:
    radial-gradient(120% 80% at 100% 100%, rgba(6, 25, 79, 0.95) 0%, rgba(6, 25, 79, 0) 60%),
    linear-gradient(165deg, #2F54F1 0%, #2449D8 55%, #10267A 100%);
  overflow: hidden;
  isolation: isolate;
}

.dfl-tool__count {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1rem;
}

.dfl-tool__letter {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: clamp(10rem, 19vw, 18rem);
  padding: 1rem 0 0;
  margin-bottom: 30%;
}

/* The DEFLATE reel: a one-letter window over a vertical strip of all seven
   letters. The strip slides to the selected letter. */
.dfl-reel {
  height: 1em;
  line-height: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.dfl-reel span {
  display: block;
  height: 1em;
  text-align: center;
  transform: translateY(calc(var(--i, 0) * -100%));
  transition: transform 0.75s var(--ease-spring);
}

.dfl-tool:not(.is-enhanced) .dfl-reel span:not(:first-child) {
  display: none;
}

.dfl-tool__top {
  position: relative;
  z-index: 2;
}

/* Homepage hero line artwork, redrawn for the panel's lower half */
.dfl-lines {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40%;
  z-index: 0;
  pointer-events: none;
}

.dfl-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1400;
  stroke-dashoffset: 0;
}

.dfl-line--3 { stroke: rgba(255, 255, 255, 0.32); stroke-width: 1.1; }
.dfl-line--4 { stroke: rgba(255, 255, 255, 0.26); stroke-width: 1; }

.dfl-tool.is-enhanced:not(.is-ready) .dfl-line {
  stroke-dashoffset: 1400;
}

.dfl-tool.is-ready .dfl-line {
  animation: dflDraw 3.2s var(--ease-out-expo) both;
}

.dfl-tool.is-ready .dfl-line--2 { animation-delay: 0.25s; }
.dfl-tool.is-ready .dfl-line--3 { animation-delay: 0.5s; }
.dfl-tool.is-ready .dfl-line--4 { animation-delay: 0.75s; }

@keyframes dflDraw {
  from { stroke-dashoffset: 1400; }
  to { stroke-dashoffset: 0; }
}

.dfl-dot {
  opacity: 0;
}

.dfl-tool.is-ready .dfl-dot {
  animation: dflDotIn 0.8s var(--ease-out-expo) both;
}

.dfl-tool.is-ready .dfl-dot--1 { animation-delay: 1.4s; }
.dfl-tool.is-ready .dfl-dot--2 { animation-delay: 1.7s; }
.dfl-tool.is-ready .dfl-dot--3 { animation-delay: 2s; }

@keyframes dflDotIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Letter rail ---- */
.dfl-rail {
  display: flex;
  gap: 0.5rem;
}

.dfl-tool.is-enhanced .dfl-tile {
  flex: 1 1 0;
  width: auto;
  height: auto;
  max-width: 60px;
  aspect-ratio: 1;
}

.dfl-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.5vw, 1.5rem);
  line-height: 1;
  transition: background 0.35s var(--ease-spring), color 0.35s var(--ease-spring), border-color 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
}

.dfl-tile:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dfl-tile:active {
  transform: scale(0.94);
}

.dfl-tile:focus-visible {
  outline: 2px solid var(--dfl-focus);
  outline-offset: 3px;
}

.dfl-tile[aria-selected="true"] {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
  box-shadow: 0 10px 28px rgba(6, 25, 79, 0.35);
}

/* Marked-present badge */

/* One orchestrated entrance: tiles settle in sequence when the tool first appears */
.dfl-tool.is-enhanced:not(.is-ready) .dfl-tile {
  opacity: 0;
  transform: translateY(10px) scale(1.12);
}

.dfl-tool.is-ready .dfl-tile {
  transition: opacity 0.5s var(--ease-spring), transform 0.6s var(--ease-spring), background 0.35s var(--ease-spring), color 0.35s var(--ease-spring), border-color 0.35s var(--ease-spring);
}

.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(2) { transition-delay: 0.05s, 0.05s, 0s, 0s, 0s; }
.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(3) { transition-delay: 0.1s, 0.1s, 0s, 0s, 0s; }
.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(4) { transition-delay: 0.15s, 0.15s, 0s, 0s, 0s; }
.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(5) { transition-delay: 0.2s, 0.2s, 0s, 0s, 0s; }
.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(6) { transition-delay: 0.25s, 0.25s, 0s, 0s, 0s; }
.dfl-tool.is-ready:not(.is-settled) .dfl-tile:nth-child(7) { transition-delay: 0.3s, 0.3s, 0s, 0s, 0s; }

/* ---- Tool body ---- */
.dfl-tool__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3.5vw, 3.5rem) 0;
  background: #ffffff;
  border-radius: 0 28px 28px 0;
}

.dfl-tool__viewport {
  flex: 1;
  touch-action: pan-y;
}

.dfl-factor {
  scroll-margin-top: 6rem;
}

/* Fixed stage: every factor sits in the same grid cell, so the card is always
   as tall as the longest factor and never resizes when switching */
.dfl-tool.is-enhanced .dfl-tool__viewport {
  display: grid;
  align-items: start;
}

.dfl-tool.is-enhanced .dfl-factor {
  grid-area: 1 / 1;
  visibility: hidden;
}

.dfl-tool.is-enhanced .dfl-factor.is-active,
.dfl-tool.is-enhanced .dfl-factor.is-leaving {
  visibility: visible;
}

.dfl-factor.is-leaving {
  pointer-events: none;
}

.dfl-tool:not(.is-enhanced) .dfl-factor + .dfl-factor {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--dfl-line);
}

.dfl-factor__title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.12;
  color: var(--navy);
  margin-bottom: 1.5rem;
  max-width: 24ch;
}

.dfl-factor__chip {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 0.3em;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.7em;
  transform: translateY(-0.12em);
}

.dfl-tool.is-enhanced .dfl-factor__chip {
  display: none;
}

.dfl-factor__label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.625rem;
}

.dfl-factor__criteria {
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.65;
  color: var(--dfl-text);
  max-width: 62ch;
  margin-bottom: 1.5rem;
}

.dfl-effect {
  padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem);
  border-radius: 18px;
  background: var(--dfl-ice);
}

.dfl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem 2rem;
  margin: 0.25rem 0 0.25rem;
}

.dfl-stats--four {
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
}

.dfl-stats--four .dfl-stat__value {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
}

@media (max-width: 1200px) {
  .dfl-stats--four {
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }
}

.dfl-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dfl-stat__value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 2.875rem);
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dfl-stat__label {
  font-size: 0.875rem;
  color: var(--dfl-muted);
  line-height: 1.4;
}

.dfl-factor sup {
  font-size: 0.5em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.08em;
}

.dfl-effect__statement sup,
.dfl-effect__note sup {
  font-size: 0.62em;
}

.dfl-factor sup a,
.dfl-effect__caption a {
  color: var(--blue);
}

.dfl-factor sup a:hover,
.dfl-effect__caption a:hover {
  text-decoration: underline;
}

.dfl-effect__statement {
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.3;
  color: var(--navy);
  max-width: 30ch;
}

.dfl-effect__caption {
  font-size: 0.8125rem;
  color: var(--dfl-muted);
  margin-top: 1rem;
}

.dfl-effect__note {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dfl-text);
  margin-top: 1rem;
  max-width: 62ch;
}

.dfl-factor__sources {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--dfl-muted);
  margin-top: 1.25rem;
}

.dfl-factor__sources a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* ---- Action bar ---- */
.dfl-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.125rem 0 clamp(1.25rem, 2.5vw, 2rem);
  border-top: 1px solid var(--dfl-line);
  background: #ffffff;
}

.dfl-bar[hidden] {
  display: none;
}

.dfl-bar__nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 52px;
  min-width: 52px;
  padding: 0 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--dfl-line);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.3s var(--ease-spring), background 0.3s var(--ease-spring), transform 0.3s var(--ease-spring);
}

.dfl-bar__nav:hover {
  border-color: rgba(6, 25, 79, 0.35);
}

.dfl-bar__nav:active {
  transform: scale(0.96);
}

.dfl-bar__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.dfl-bar__nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dfl-bar__nav--next {
  margin-left: auto;
  padding: 0 1.125rem 0 1.375rem;
}

.dfl-bar__nav:focus-visible,
.dfl-header .btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.dfl-header .btn:focus-visible {
  outline-color: var(--dfl-focus);
}

/* ---- Boundary line ---- */
.dfl-review__boundary {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--dfl-muted);
  max-width: 80ch;
}

.dfl-review__boundary a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Summary ---- */

/* ---- Limitations ---- */
.dfl-limits {
  background: #ffffff;
  scroll-margin-top: 4rem;
}

.dfl-limits h2 {
  color: var(--navy);
  margin-bottom: 2.5rem;
}

.dfl-limits__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.dfl-limits__card {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 22px;
  background: var(--dfl-ice);
  color: var(--dfl-text);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.dfl-limits__card--dark {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
}

.dfl-limits__label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.dfl-limits__card--dark .dfl-limits__label {
  color: var(--dfl-focus);
}

.dfl-limits__card ul {
  display: grid;
  gap: 1rem;
}

.dfl-limits__card strong {
  color: #ffffff;
  font-weight: 700;
}

/* ---- References ---- */
.dfl-refs {
  background: #ffffff;
  padding-top: 0;
}

.dfl-refs .container {
  border-top: 1px solid var(--dfl-line);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.dfl-refs__title {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.dfl-refs__list {
  list-style: decimal;
  padding-left: 1.5rem;
  display: grid;
  gap: 0.75rem;
  max-width: 88ch;
  color: var(--dfl-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.dfl-refs__list li {
  padding-left: 0.375rem;
  scroll-margin-top: 7rem;
  border-radius: 6px;
  transition: background 0.6s var(--ease-spring);
}

.dfl-refs__list li:target {
  background: var(--dfl-ice);
}

.dfl-refs__doc {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--dfl-muted);
}

.dfl-refs__doc a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keep the floating Contact button out of the tool's way */
body.dfl-in-tool .floating-cta {
  opacity: 0;
  pointer-events: none;
}

/* ---- Laptop / tablet ---- */
@media (max-width: 1024px) {
  .dfl-overview__grid {
    grid-template-columns: 1fr;
  }

  .dfl-tool {
    grid-template-columns: minmax(260px, 34%) 1fr;
  }

}

/* ---- Phone ---- */
@media (max-width: 768px) {
  .dfl-header {
    padding: 8.5rem 0 3.5rem;
  }

  .dfl-header__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .dfl-header__actions .btn {
    justify-content: center;
  }

  .dfl-review .container {
    padding: 0 1rem;
  }

  .dfl-review__intro {
    padding: 0 0.5rem;
  }

  .dfl-tool {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .dfl-tool__panel {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "count letter"
      "rail rail";
    align-items: start;
    gap: 0.75rem 1rem;
    padding: 1.25rem 1rem 1.25rem;
    border-radius: 24px 24px 0 0;
  }

  .dfl-tool__top { display: contents; }

  .dfl-tool__count { grid-area: count; padding-top: 0.25rem; margin-bottom: 0; }

  .dfl-tool__letter {
    grid-area: letter;
    z-index: 1;
    margin-bottom: 0;
    font-size: 4.25rem;
    min-height: 0;
    padding: 0;
    line-height: 0.75;
  }

  .dfl-rail {
    grid-area: rail;
    flex-wrap: nowrap;
    gap: 0.375rem;
    margin-top: 0.25rem;
  }

  .dfl-tool.is-enhanced .dfl-tile {
    max-width: 52px;
    aspect-ratio: auto;
    height: 46px;
  }

  .dfl-lines {
    bottom: auto;
    top: 0;
    height: 64%;
    opacity: 0.45;
  }

  .dfl-dot {
    display: none;
  }

  .dfl-rail {
    position: relative;
    z-index: 2;
  }

  .dfl-tool__body {
    padding: 1.75rem 1.25rem 0;
    border-radius: 0 0 24px 24px;
  }

  .dfl-factor__title {
    margin-bottom: 1.5rem;
  }

  /* Thumb-reach action bar pinned to the bottom while the tool is on screen */
  .dfl-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    gap: 0.5rem;
    margin: 1.75rem -1.25rem 0;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
    border-radius: 0 0 24px 24px;
    box-shadow: 0 -10px 24px rgba(6, 25, 79, 0.06);
  }

  

  .dfl-bar__nav--next {
    margin-left: 0;
    padding: 0 1rem;
  }

  .dfl-bar__next-text {
    display: none;
  }

  

  

  

  

  

  .dfl-limits__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  

  .dfl-bar__nav {
    min-width: 46px;
    height: 48px;
    padding: 0 0.75rem;
  }

  
}

@media (prefers-reduced-motion: reduce) {
  .dfl-tool.is-enhanced:not(.is-ready) .dfl-tile {
    opacity: 1;
    transform: none;
  }

  .dfl-tool.is-enhanced:not(.is-ready) .dfl-line,
  .dfl-tool.is-ready .dfl-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .dfl-dot {
    display: none;
  }

  .dfl-tile {
    transition: none;
  }
}

/* ============================================
   Motion + styling layer (2026-09-29 round 5)
   ============================================ */

/* Entrance: the tool card rises in the first time it scrolls into view */
.dfl-tool {
  transition: opacity 0.8s var(--ease-spring), transform 1s var(--ease-spring);
}

.dfl-tool.is-enhanced:not(.is-ready) {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
}

/* Gliding selector behind the active letter tile */
.dfl-rail {
  position: relative;
}

.dfl-rail__glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(6, 25, 79, 0.35);
  opacity: 0;
  pointer-events: none;
}

.dfl-tool.is-ready .dfl-rail__glider {
  opacity: 1;
  transition:
    transform 0.55s var(--ease-spring),
    width 0.55s var(--ease-spring),
    height 0.55s var(--ease-spring),
    opacity 0.4s var(--ease-spring) 0.1s;
}

.dfl-tool.is-enhanced .dfl-tile {
  z-index: 1;
}

.dfl-tool.is-enhanced .dfl-tile[aria-selected="true"] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--navy);
}

.dfl-tool.is-settled .dfl-tile:hover {
  transform: translateY(-2px);
}

.dfl-tool.is-settled .dfl-tile[aria-selected="true"]:hover {
  transform: none;
}

/* Counter number rolls between factors */
.dfl-tool__count span {
  display: inline-block;
}

/* Panel depth and a soft light that follows the pointer */
.dfl-tool__panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.dfl-tool__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-spring);
  pointer-events: none;
}

.dfl-tool__panel:hover::after {
  opacity: 1;
}

/* Detail side: stronger title, refined evidence card */
.dfl-factor__title {
  font-size: clamp(1.875rem, 2.8vw, 2.75rem);
  letter-spacing: -0.01em;
}

.dfl-effect {
  background: linear-gradient(160deg, #F3F6FE 0%, #EAF0FD 100%);
  box-shadow: inset 0 0 0 1px rgba(47, 84, 241, 0.08);
}

.dfl-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Mark present: navy fill sweeps across the button */

/* Next is the primary action */
.dfl-bar__nav--next {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.dfl-bar__nav--next:hover {
  background: #0E2A7A;
  border-color: #0E2A7A;
}

.dfl-bar__nav--next svg {
  transition: transform 0.35s var(--ease-spring);
}

.dfl-bar__nav--next:hover svg {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .dfl-tool,
  .dfl-tool.is-ready .dfl-rail__glider {
    transition: none;
  }

  .dfl-tool.is-enhanced:not(.is-ready) {
    opacity: 1;
    transform: none;
  }

  .dfl-tool__panel::after {
    display: none;
  }
}

/* ============================================
   Round 6: centered letters, primary Mark button, attached review tray
   ============================================ */

/* Centered composition in the blue panel; a wider panel lets tiles and letter grow */
.dfl-tool {
  grid-template-columns: minmax(320px, 43%) 1fr;
}

@media (max-width: 1024px) {
  .dfl-tool {
    grid-template-columns: minmax(280px, 40%) 1fr;
  }
}

@media (max-width: 768px) {
  .dfl-tool {
    grid-template-columns: 1fr;
  }
}

.dfl-tool__panel {
  align-items: center;
  text-align: center;
}

.dfl-tool__top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dfl-tool .dfl-rail {
  justify-content: center;
  width: 100%;
  gap: 0.5rem;
}

.dfl-tool.is-enhanced .dfl-tile {
  max-width: 64px;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  border-radius: 14px;
}

.dfl-rail__glider {
  border-radius: 14px;
}

/* Prompt + primary Mark button */
.dfl-bar {
  flex-wrap: wrap;
  row-gap: 0.625rem;
}

.dfl-bar__nav--next {
  background: #ffffff;
  border-color: rgba(6, 25, 79, 0.22);
  color: var(--navy);
}

.dfl-bar__nav--next:hover {
  background: #ffffff;
  border-color: var(--navy);
}

/* Review tray: attached to the bottom of the tool card */
.dfl-tool.is-enhanced .dfl-tool__panel {
  border-radius: 28px 0 0 0;
}

.dfl-tool.is-enhanced .dfl-tool__body {
  border-radius: 0 28px 0 0;
}

/* Mini DEFLATE word: a smaller echo of the rail at the top of the card */

/* Check badge, matching the one on the rail */

/* The letter on screen gets a ring, tying tray and card together */

@media (max-width: 768px) {
  .dfl-tool.is-enhanced .dfl-tool__panel {
    border-radius: 24px 24px 0 0;
    align-items: stretch;
    text-align: left;
  }

  .dfl-tool.is-enhanced .dfl-tool__body {
    border-radius: 0;
  }

  .dfl-tool__top {
    display: contents;
  }

  .dfl-tool__count {
    text-align: left;
    align-self: start;
  }

  .dfl-tool .dfl-rail {
    justify-content: space-between;
  }

  .dfl-tool__letter {
    justify-content: flex-end;
    width: auto;
  }

  .dfl-bar {
    border-radius: 0;
  }

  

  

  

  

  

  

  

  

  
}

@media (prefers-reduced-motion: reduce) {
  .dfl-reel span {
    transition: none;
  }
}

/* ============================================
   Round 8: liquid glass + tablet layouts
   ============================================ */

/* Ambient brand light behind the tool so the glass surfaces have depth */
.dfl-review {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.dfl-review::before {
  content: '';
  position: absolute;
  inset: -15% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 42% at 12% 28%, rgba(47, 84, 241, 0.2) 0%, transparent 70%),
    radial-gradient(34% 40% at 88% 62%, rgba(30, 149, 255, 0.2) 0%, transparent 70%),
    radial-gradient(30% 30% at 55% 105%, rgba(6, 25, 79, 0.12) 0%, transparent 70%);
  animation: dflDrift 28s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes dflDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

/* Tool card: glass rim */
.dfl-tool {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: -1px;
  box-shadow: 0 30px 80px rgba(6, 25, 79, 0.16), 0 2px 8px rgba(6, 25, 79, 0.05);
}

/* Content side: frosted glass */
.dfl-tool__body {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
}

.dfl-bar {
  background: transparent;
}

/* Panel tiles: glass keys with a specular top edge */
.dfl-tile {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.dfl-rail__glider {
  background: linear-gradient(180deg, #ffffff 0%, #EEF2FD 100%);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(6, 25, 79, 0.06), 0 10px 28px rgba(6, 25, 79, 0.35);
}

/* Mark button: glossy brand blue with a specular highlight */

/* Secondary buttons: light glass */
.dfl-bar__nav,
.dfl-bar__nav--next {
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(6, 25, 79, 0.06);
}

/* Review tray: glass shelf */

/* ---- Touch screens and phone widths: floating glass dock ---- */
@media (pointer: coarse), (max-width: 768px) {
  .dfl-bar {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 5;
    margin: 1.5rem -0.75rem 1rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.74);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 14px 36px rgba(6, 25, 79, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }

  
}

/* No sticky hover states on touch */
@media (hover: none) {
  

  .dfl-tool.is-settled .dfl-tile:hover {
    transform: none;
  }

  

  

  .dfl-bar__nav--next:hover svg {
    transform: none;
  }
}

/* ---- Tablet portrait (iPad mini, Air, Pro 11", Pro 13" portrait):
       wide blue band on top, full-width content below ---- */
@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .dfl-tool {
    grid-template-columns: 1fr;
  }

  .dfl-tool.is-enhanced .dfl-tool__panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    grid-template-areas: "letter top";
    align-items: center;
    gap: 1rem 2rem;
    padding: 2rem 2.5rem;
    border-radius: 28px 28px 0 0;
    text-align: left;
  }

  .dfl-tool__top {
    grid-area: top;
    align-items: stretch;
  }

  .dfl-tool__count {
    text-align: left;
  }

  .dfl-tool .dfl-rail {
    justify-content: space-between;
  }

  .dfl-tool.is-enhanced .dfl-tile {
    max-width: 60px;
    font-size: 1.5rem;
  }

  .dfl-tool__letter {
    grid-area: letter;
    margin: 0;
    padding: 0;
    font-size: clamp(8rem, 17vw, 11rem);
  }

  .dfl-lines {
    height: 70%;
    opacity: 0.55;
  }

  .dfl-tool.is-enhanced .dfl-tool__body {
    border-radius: 0;
    padding: 2.25rem 2.5rem 0;
  }

  .dfl-factor__title {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }

  

  

  
  

  

  

  
}

/* ---- Short landscape screens (iPad landscape, small laptops):
       compact the card so it fits the viewport ---- */
@media (min-width: 769px) and (max-height: 860px) and (orientation: landscape) {
  .dfl-tool__letter {
    font-size: clamp(8rem, 14vw, 12.5rem);
    margin-bottom: 22%;
  }

  .dfl-tool__panel {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .dfl-tool__body {
    padding-top: 1.75rem;
  }

  .dfl-factor__title {
    font-size: clamp(1.625rem, 2.4vw, 2.25rem);
    margin-bottom: 1rem;
  }

  .dfl-factor__criteria {
    margin-bottom: 1rem;
  }

  .dfl-effect {
    padding: 1.125rem 1.5rem;
  }

  .dfl-bar {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  

  
}

/* ---- Large phones / iPad mini portrait (600-768): scale the phone layout up ---- */
@media (min-width: 600px) and (max-width: 768px) {
  .dfl-tool.is-enhanced .dfl-tool__panel {
    padding: 1.5rem 1.75rem;
  }

  .dfl-tool__letter {
    font-size: 6.5rem;
  }

  .dfl-tool.is-enhanced .dfl-tile {
    max-width: 64px;
    height: 56px;
    font-size: 1.5rem;
  }

  .dfl-tool.is-enhanced .dfl-tool__body {
    padding: 2rem 1.75rem 0;
  }

  

  
}

/* ---- Phone: the dock floats inside the card instead of spanning it ---- */
@media (max-width: 768px) {
  .dfl-bar {
    margin: 1.5rem -0.5rem 0.75rem;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dfl-review::before {
    animation: none;
  }
}

/* Fixes found while preparing the walkthrough (2026-09-29) */

@media (max-width: 420px) {
  .dfl-bar {
    gap: 0.5rem;
  }

  

  

  .dfl-bar__nav {
    min-width: 48px;
    height: 48px;
    padding: 0 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dfl-tool.is-ready .dfl-tile,
  .dfl-tool.is-ready:not(.is-settled) .dfl-tile,
  .dfl-bar__nav,
  .dfl-bar__nav svg {
    transition: none;
  }
}

/* ============================================
   Print: only the bedside summary sheet prints
   ============================================ */

/* Foldables unfolded and small landscape tablets (769-1024 wide, landscape):
   widen the panel slightly so the letter tiles stay comfortably tappable */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
  .dfl-tool {
    grid-template-columns: minmax(360px, 44%) 1fr;
  }

  .dfl-tool__panel {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .dfl-tool .dfl-rail {
    gap: 0.3rem;
  }

  .dfl-bar {
    flex-wrap: wrap;
    column-gap: 0.5rem;
  }

  .dfl-bar__next-text {
    display: none;
  }

  

  .dfl-bar__nav--next {
    padding: 0 1rem;
  }

  
}

/* ============================================
   Round 9 (2026-10-01): explorer only, per InnoCare regulatory feedback.
   No checklist, no selection summary, no generated printout.
   ============================================ */

/* ---- Seven factors at a glance, overlapping the header ---- */
.dfl-header {
  padding-bottom: 6rem;
}

.dfl-glance {
  position: relative;
  z-index: 3;
  margin-top: -3.75rem;
  padding-bottom: 1rem;
}

.dfl-glance__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

.dfl-glance__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: 1.125rem 1rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 44px rgba(6, 25, 79, 0.14), inset 0 1px 0 #ffffff;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), border-color 0.4s var(--ease-spring);
}

.dfl-glance__card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 84, 241, 0.35);
  box-shadow: 0 24px 52px rgba(6, 25, 79, 0.18), inset 0 1px 0 #ffffff;
}

.dfl-glance__card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.dfl-glance__letter {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.625rem;
  line-height: 1;
}

.dfl-glance__name {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  line-height: 1.25;
  color: var(--navy);
}

.dfl-glance__card.is-current {
  border-color: rgba(47, 84, 241, 0.5);
}

.dfl-glance__hint {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--dfl-muted);
}

/* ---- Explorer card: full rounded corners again (no tray below) ---- */
.dfl-tool.is-enhanced .dfl-tool__panel {
  border-radius: 28px 0 0 28px;
}

.dfl-tool.is-enhanced .dfl-tool__body {
  border-radius: 0 28px 28px 0;
}

/* ---- Bottom bar: previous, position, next ---- */
.dfl-bar {
  flex-wrap: nowrap;
  justify-content: space-between;
}

.dfl-bar__dots {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.dfl-bar__dots span {
  width: 7px;
  height: 7px;
  border-radius: 100px;
  background: rgba(6, 25, 79, 0.18);
  transition: width 0.45s var(--ease-spring), background 0.45s var(--ease-spring);
}

.dfl-bar__dots span.is-current {
  width: 22px;
  background: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .dfl-bar__dots span {
    transition: none;
  }
}

.dfl-bar__nav--next {
  margin-left: 0;
}

.dfl-bar__nav:disabled,
.dfl-bar__nav--next:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---- Under the card: limitation line + approved PDF ---- */
.dfl-review__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dfl-review__foot .dfl-review__boundary {
  margin-top: 0;
  flex: 1 1 420px;
}

.dfl-review__pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 46px;
  padding: 0 1.375rem;
  border-radius: 100px;
  border: 1.5px solid var(--navy);
  background: #ffffff;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s var(--ease-spring), color 0.3s var(--ease-spring);
}

.dfl-review__pdf::before {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M4 21h16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M4 21h16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dfl-review__pdf:hover {
  background: var(--navy);
  color: #ffffff;
}

.dfl-review__pdf:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---- Tablet portrait band layout ---- */
@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .dfl-tool.is-enhanced .dfl-tool__panel {
    border-radius: 28px 28px 0 0;
  }

  .dfl-tool.is-enhanced .dfl-tool__body {
    border-radius: 0 0 28px 28px;
  }
}

@media (max-width: 1100px) {
  .dfl-glance__grid {
    gap: 0.5rem;
  }

  .dfl-glance__card {
    padding: 0.875rem 0.75rem 1rem;
  }

  .dfl-glance__letter {
    width: 40px;
    height: 40px;
    font-size: 1.375rem;
  }

  .dfl-glance__name {
    font-size: 0.9375rem;
  }
}

/* ---- Phones: compact two-column list ---- */
@media (max-width: 768px) {
  .dfl-header {
    padding-bottom: 5rem;
  }

  .dfl-glance {
    margin-top: -3rem;
  }

  .dfl-glance .container {
    padding: 0 1rem;
  }

  .dfl-glance__grid {
    grid-template-columns: 1fr 1fr;
  }

  .dfl-glance__grid li:last-child {
    grid-column: 1 / -1;
  }

  .dfl-glance__card {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 14px;
  }

  .dfl-glance__letter {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.25rem;
  }

  .dfl-glance__name {
    font-size: 0.9375rem;
  }

  .dfl-tool.is-enhanced .dfl-tool__panel {
    border-radius: 24px 24px 0 0;
  }

  .dfl-tool.is-enhanced .dfl-tool__body {
    border-radius: 0 0 24px 24px;
  }

  .dfl-review__pdf {
    width: 100%;
    justify-content: center;
  }
}

@media (hover: none) {
  .dfl-glance__card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dfl-glance__card,
  .dfl-review__pdf {
    transition: none;
  }
}

/* ---- Printing the page: drop site chrome and controls ---- */
@media print {
  .nav,
  .floating-cta,
  .footer,
  .dfl-header__actions,
  .dfl-bar,
  .dfl-review__pdf,
  .dfl-lines {
    display: none !important;
  }

  .dfl-glance {
    margin-top: 0;
  }

  .dfl-glance__card,
  .dfl-tool,
  .dfl-tool__body {
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* ============================================
   Round 10 (2026-10-01): motion and UX polish
   ============================================ */

/* ---- Header moment: homepage lines draw in, overview cards settle in sequence ---- */
.dfl-header {
  isolation: isolate;
}

.dfl-hlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.dfl-hline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: dflHeaderDraw 3.4s var(--ease-out-expo) forwards;
}

.dfl-hline--2 { animation-delay: 0.35s; stroke: rgba(255, 255, 255, 0.16); }
.dfl-hline--3 { animation-delay: 0.7s; stroke: rgba(255, 255, 255, 0.12); }

@keyframes dflHeaderDraw {
  to { stroke-dashoffset: 0; }
}

.dfl-glance__grid > li {
  animation: dflSettle 0.7s var(--ease-spring) both;
}

.dfl-glance__grid > li:nth-child(1) { animation-delay: 0.15s; }
.dfl-glance__grid > li:nth-child(2) { animation-delay: 0.21s; }
.dfl-glance__grid > li:nth-child(3) { animation-delay: 0.27s; }
.dfl-glance__grid > li:nth-child(4) { animation-delay: 0.33s; }
.dfl-glance__grid > li:nth-child(5) { animation-delay: 0.39s; }
.dfl-glance__grid > li:nth-child(6) { animation-delay: 0.45s; }
.dfl-glance__grid > li:nth-child(7) { animation-delay: 0.51s; }

@keyframes dflSettle {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---- Scroll-linked reveals (native CSS; browsers without support show content as-is) ---- */
@supports (animation-timeline: view()) {
  .dfl-overview__grid > *,
  .dfl-limits h2,
  .dfl-limits__card,
  .dfl-refs .container {
    animation: dflReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@keyframes dflReveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* ---- Signature morph (View Transitions) ---- */
.dfl-tool.is-morphing,
.dfl-tool.is-morphing * {
  transition: none !important;
}

::view-transition-group(dfl-morph) {
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

::view-transition-old(dfl-morph),
::view-transition-new(dfl-morph) {
  animation-duration: 0.7s;
  height: 100%;
  object-fit: contain;
}

/* ---- Citation pop-up ---- */
.dfl-cite {
  position: fixed;
  inset: auto;
  margin: 0;
  max-width: calc(100vw - 24px);
  padding: 1rem 1.125rem 1.125rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 20px 50px rgba(6, 25, 79, 0.22), inset 0 1px 0 #ffffff;
  color: var(--dfl-text);
}

.dfl-cite:popover-open {
  animation: dflCiteIn 0.32s var(--ease-spring);
}

@keyframes dflCiteIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.dfl-cite::backdrop {
  background: transparent;
}

.dfl-cite:focus {
  outline: none;
}

.dfl-cite__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.dfl-cite__text {
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.dfl-cite__all {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dfl-cite__all:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Condensed letter bar (tablets and phones) ---- */
.dfl-minirail {
  display: none;
}

@media (max-width: 1100px) {
  .dfl-minirail {
    position: fixed;
    top: 6rem;
    left: 50%;
    z-index: 900;
    display: flex;
    gap: 0.3rem;
    padding: 0.375rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    box-shadow: 0 12px 30px rgba(6, 25, 79, 0.16), inset 0 1px 0 #ffffff;
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
    transition: opacity 0.35s var(--ease-spring), transform 0.45s var(--ease-spring);
  }

  .dfl-minirail.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }

  .dfl-minirail__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    transition: background 0.3s var(--ease-spring), color 0.3s var(--ease-spring);
  }

  .dfl-minirail__btn.is-current {
    background: var(--blue);
    color: #ffffff;
  }

  .dfl-minirail__btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
}

@media (max-width: 768px) {
  .dfl-minirail {
    top: 5.25rem;
    gap: 0.2rem;
  }

  .dfl-minirail__btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 360px) {
  .dfl-minirail__btn {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}

/* ---- Keyboard hint (mouse and keyboard devices only) ---- */
.dfl-review__keys {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--dfl-muted);
}

.dfl-review__keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.3rem;
  border-radius: 6px;
  border: 1px solid rgba(6, 25, 79, 0.18);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(6, 25, 79, 0.12);
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--navy);
}

@media (hover: hover) and (pointer: fine) {
  .dfl-review__keys {
    display: block;
  }
}

/* ---- Copy link + toast ---- */
.dfl-review__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.dfl-review__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 46px;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(6, 25, 79, 0.3);
}

.dfl-review__copy[hidden] {
  display: none;
}

.dfl-review__copy::before {
  content: '';
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dfl-review__copy:hover {
  text-decoration-color: currentColor;
}

.dfl-review__copy:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.dfl-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 1001;
  padding: 0.75rem 1.25rem;
  border-radius: 100px;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(6, 25, 79, 0.3);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-spring), transform 0.4s var(--ease-spring);
}

.dfl-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 768px) {
  .dfl-review__actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .dfl-review__copy {
    justify-content: center;
  }

  .dfl-toast {
    bottom: max(6.5rem, calc(env(safe-area-inset-bottom) + 5.5rem));
  }
}

/* ---- Reduced motion: keep every state change instant ---- */
@media (prefers-reduced-motion: reduce) {
  .dfl-hline {
    animation: none;
    stroke-dashoffset: 0;
  }

  .dfl-glance__grid > li,
  .dfl-overview__grid > *,
  .dfl-limits h2,
  .dfl-limits__card,
  .dfl-refs .container,
  .dfl-cite:popover-open {
    animation: none;
  }

  .dfl-minirail,
  .dfl-minirail__btn,
  .dfl-toast {
    transition: none;
  }
}

/* ---- Review fixes (2026-10-01) ---- */
/* Popover fallback: never render an empty glass box where Popover isn't supported */
.dfl-cite { display: none; }
.dfl-cite:popover-open { display: block; }

/* Hidden controls must not be focusable in browsers without inert */
@media (max-width: 1100px) {
  .dfl-minirail { visibility: hidden; transition: opacity 0.35s var(--ease-spring), transform 0.45s var(--ease-spring), visibility 0s linear 0.45s; }
  .dfl-minirail.is-visible { visibility: visible; transition: opacity 0.35s var(--ease-spring), transform 0.45s var(--ease-spring), visibility 0s; }
}
body.dfl-in-tool .floating-cta { visibility: hidden; }

/* Header lines: long enough dash to draw fully on very wide screens */
.dfl-hline { stroke-dasharray: 4200; stroke-dashoffset: 4200; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dfl-hline { stroke-dashoffset: 0; }
}

/* Printing the page shows all seven factors, never just the one being viewed */
@media print {
  .dfl-tool { display: block !important; opacity: 1 !important; transform: none !important; box-shadow: none !important; }
  .dfl-tool__panel, .dfl-minirail, .dfl-cite, .dfl-toast, .dfl-review__actions, .dfl-review__keys, .dfl-hlines { display: none !important; }
  .dfl-tool.is-enhanced .dfl-tool__viewport { display: block !important; }
  .dfl-tool.is-enhanced .dfl-factor { visibility: visible !important; grid-area: auto !important; break-inside: avoid; margin-bottom: 1.5rem; }
  .dfl-tool.is-enhanced .dfl-tool__body { background: #fff !important; border-radius: 0 !important; padding: 0 !important; }
  .dfl-overview__grid > *, .dfl-limits h2, .dfl-limits__card, .dfl-refs .container, .dfl-glance__grid > li { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ============================================
   Round 11 (2026-10-01): mobile acrostic, next-up preview, factor name
   ============================================ */

/* ---- Minimal factor name under the big letter (desktop and landscape) ---- */
.dfl-tool__name {
  position: relative;
  z-index: 1;
  margin: -0.25rem 0 30%;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.dfl-tool.is-enhanced .dfl-tool__letter {
  margin-bottom: 0.5rem;
}

.dfl-tool:not(.is-enhanced) .dfl-tool__name {
  display: none;
}

@media (min-width: 769px) and (max-height: 860px) and (orientation: landscape) {
  .dfl-tool__name {
    margin-bottom: 22%;
  }
}

/* Tablet band and phone headers are compact; the title already names the factor */
@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .dfl-tool__name { display: none; }
  .dfl-tool.is-enhanced .dfl-tool__letter { margin-bottom: 0; }
}

@media (max-width: 768px) {
  .dfl-tool__name { display: none; }
  .dfl-tool.is-enhanced .dfl-tool__letter { margin-bottom: 0; }
}

/* ---- Phones: the overview reads as a vertical acrostic, D-E-F-L-A-T-E top to bottom ---- */
@media (max-width: 768px) {
  .dfl-glance__grid {
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
    padding: 0.375rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 18px 44px rgba(6, 25, 79, 0.16), inset 0 1px 0 #ffffff;
  }

  /* A thin spine through the letters so they read as one word */
  .dfl-glance__grid::before {
    content: '';
    position: absolute;
    left: calc(0.375rem + 0.625rem + 18px);
    top: 1.75rem;
    bottom: 1.75rem;
    width: 2px;
    margin-left: -1px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(47, 84, 241, 0.35), rgba(47, 84, 241, 0.12));
  }

  .dfl-glance__grid li:last-child {
    grid-column: auto;
  }

  .dfl-glance__grid > li + li .dfl-glance__card::after {
    content: '';
    position: absolute;
    top: 0;
    left: calc(0.625rem + 36px + 0.875rem);
    right: 0.75rem;
    height: 1px;
    background: rgba(6, 25, 79, 0.07);
  }

  .dfl-glance__card {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 0.75rem 0.5rem 0.625rem;
    border: none;
    border-radius: 14px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .dfl-glance__card:active {
    background: var(--dfl-ice);
  }

  .dfl-glance__card::before {
    content: '';
    order: 3;
    margin-left: auto;
    flex: none;
    width: 7px;
    height: 7px;
    border-right: 1.75px solid rgba(47, 84, 241, 0.6);
    border-bottom: 1.75px solid rgba(47, 84, 241, 0.6);
    transform: rotate(-45deg);
  }

  .dfl-glance__letter {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.25rem;
    box-shadow: 0 0 0 3px #ffffff;
  }

  .dfl-glance__name {
    font-size: 1rem;
  }

  .dfl-glance__card.is-current {
    border: none;
  }

  .dfl-glance__hint {
    margin-top: 1rem;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
}

/* Name sits directly under the letter; spare space falls below, over the line artwork */
@media (min-width: 769px) {
  .dfl-tool.is-enhanced .dfl-tool__letter {
    flex: none;
    padding-top: clamp(1.75rem, 4vw, 3.5rem);
    margin-bottom: 0;
  }

  .dfl-tool.is-enhanced .dfl-tool__name {
    margin: 0.5rem 0 auto;
  }
}

@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .dfl-tool.is-enhanced .dfl-tool__letter { padding-top: 0; }
}

@media (min-width: 769px) {
  .dfl-tool.is-enhanced .dfl-tool__name { margin-top: -1.75rem; }
  .dfl-tool.is-enhanced .dfl-lines { height: 32%; }
}

@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .dfl-tool.is-enhanced .dfl-lines { height: 70%; }
}

/* ============================================
   Round 12 (2026-10-06): client revisions
   ============================================ */

/* ---- Overview cards now live inside the navy header, above the buttons ---- */
.dfl-header {
  padding-bottom: 4.5rem;
}

.dfl-glance {
  margin: 2.5rem auto 0;
  max-width: 1120px;
  padding-bottom: 0;
}

.dfl-header__actions {
  margin-top: 2.25rem;
}

/* Letter and name centered in each card */
.dfl-glance__card {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 1.125rem 0.75rem 1.25rem;
}

/* ---- Explorer card: height follows the open factor and glides between sizes ---- */
.dfl-tool.is-enhanced .dfl-tool__viewport {
  display: block;
  position: relative;
  overflow: clip;
  overflow-clip-margin: 8px;
  transition: height 0.55s var(--ease-spring);
}

.dfl-tool.is-enhanced .dfl-factor {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  grid-area: auto;
}

.dfl-tool.is-enhanced .dfl-factor.is-active {
  position: relative;
}

/* No line artwork in the panel; the panel sizes to its content */
.dfl-tool .dfl-lines {
  display: none;
}

@media (min-width: 769px) {
  .dfl-tool.is-enhanced .dfl-tool__name {
    margin-bottom: 2rem;
  }
}

@media (min-width: 769px) and (max-height: 860px) and (orientation: landscape) {
  .dfl-tool__name {
    margin-bottom: 1.5rem;
  }
}

/* ---- Phones: the vertical D-E-F-L-A-T-E list sits in the header ---- */
@media (max-width: 768px) {
  .dfl-header {
    padding-bottom: 3rem;
  }

  .dfl-glance {
    margin-top: 1.75rem;
  }

  .dfl-glance__card {
    align-items: center;
    text-align: left;
    padding: 0.5rem 0.75rem 0.5rem 0.625rem;
  }

  .dfl-header__actions {
    margin-top: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dfl-tool.is-enhanced .dfl-tool__viewport {
    transition: none;
  }
}

@media print {
  .dfl-tool.is-enhanced .dfl-tool__viewport {
    height: auto !important;
    overflow: visible !important;
  }

  .dfl-tool.is-enhanced .dfl-factor {
    position: static !important;
  }
}

/* Reported effect is now the verbatim MKT-0009 R02 statement for every factor
   (client note 2026-10-07); sized so the longest (Agitation) stays comfortable */
.dfl-effect__statement {
  font-size: clamp(1.1875rem, 1.55vw, 1.4375rem);
  line-height: 1.42;
  max-width: none;
}
