/* dfm-build 1e317ef5a8fa90eb: generated by scripts/build-dfm.mjs from styles.css (purged for the DFM check page) + dfm-check.css + dfm-tool.css. Edit those, then run "npm run build:dfm". */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-secondary: #0f172a;
  --color-accent: #10b981;
  --color-accent-light: #34d399;
  --color-accent-dark: #047857; /* white text passes AA on this green */
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-lighter: #94a3b8;
  --color-background: #ffffff;
  --color-background-alt: #f8fafc;
  --color-background-dark: #0f172a;
  --color-border: #e2e8f0;
  --color-canada: #dc2626;
  --font-heading: "Urbanist", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  --gradient-premium: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-secondary);
}
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}
p {
  color: var(--color-text-light);
}
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.section {
  padding: 4rem 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  white-space: nowrap;
}
.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.4);
}
.btn--primary:hover,
.btn--white:hover {
  transform: translateY(-2px);
}
.btn--primary:hover {
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5);
}
.btn--secondary {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-border);
}
.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--secondary-light {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.btn--secondary-light:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}
.btn--white {
  background: white;
  color: var(--color-secondary);
}
.btn--white:hover {
  box-shadow: var(--shadow-lg);
}
.btn--large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes slideInfinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.tag {
  padding: 0.25rem 0.625rem;
  background: var(--color-background-alt);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
}
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.service-hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(37, 99, 235, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.industry-cta {
  padding: 6rem 0;
  background: var(--gradient-primary);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.industry-cta__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: white;
  margin-bottom: 1rem;
}

.industry-cta__description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto 2rem;
}
.industry-cta__description {
  font-size: 1.125rem;
  max-width: 600px;
}

.industry-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-base);
}
.header.scrolled {
  box-shadow: var(--shadow-md);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header__logo img {
  width: 50px;
  height: 50px;
}
.header__logo-text {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
}
.header__nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}
.header__nav-link:hover::after {
  width: 100%;
}
.header__nav-link:hover {
  color: var(--color-primary);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}
.header__mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-secondary);
  transition: all var(--transition-base);
  transform-origin: center;
}
.header__mobile-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header__mobile-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.header__mobile-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 1024px) {
  .header__nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    max-height: 75vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    align-content: start;
    padding: 5rem 1.25rem 1.25rem;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 1001;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    backdrop-filter: blur(10px);
  }
  .header__nav.is-open {
    transform: translateX(0);
    animation: slideInRight 0.3s ease-out;
  }
  @keyframes slideInRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  .header__nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-secondary);
    background: white;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  .header__nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--transition-base);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .header__nav-link:hover,
  .header__nav-link:active {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(16, 185, 129, 0.04) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
  }
  .header__nav-link:hover::before {
    transform: scaleY(1);
  }
  .header__nav-link::after {
    content: '→';
    font-size: 1rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-6px);
    transition: all var(--transition-base);
    color: var(--color-primary);
  }
  .header__nav-link:hover::after {
    opacity: 1;
    transform: translateX(2px);
  }
  .header__actions {
    display: none;
  }
  .header__mobile-toggle {
    display: flex;
  }
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
  }
  body.menu-open {
    overflow: hidden;
  }
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
@media (max-width: 480px) {
  .header__nav {
    max-width: 100%;
    padding: 5rem 1rem 1rem;
    gap: 0.625rem;
  }
  .header__nav-link {
    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
  }
}

.service-hero__bg-pattern {
  position: absolute;
  top: 0;
  right: -10%;
  width: 60%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(37, 99, 235, 0.08) 0%,
    transparent 70%
  );
}
@media (max-width: 640px) {
  /* Hide decorative stats card on mobile to prevent blocking images */
}
.services {
  padding: 6rem 0;
  background: var(--color-background-alt);
}
.process {
  padding: 6rem 0;
  background: var(--color-background-dark);
  color: white;
}
/* Dark process band: keep body copy light (the shared header/step rules use the light-background grey) */
/* In-copy links to the instant quote (home and location pages) */
.footer {
  background: var(--color-secondary);
  color: white;
  padding-top: 4rem;
}
.footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__brand {
  max-width: 300px;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.footer__logo img {
  width: 50px;
  height: 50px;
}
.footer__logo-text {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}
.footer__tagline {
  color: var(--color-text-lighter);
  margin-bottom: 1.5rem;
}
.footer__social {
  display: flex;
  gap: 1rem;
}
.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: white;
  transition: all var(--transition-fast);
}
.footer__social-link:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}
.footer__social-link svg {
  width: 20px;
  height: 20px;
}
.footer__address-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-top: 1.5rem;
  padding: 1rem 1.125rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  color: var(--color-text-lighter);
  overflow: hidden;
  transition: transform var(--transition-base), background var(--transition-base),
    border-color var(--transition-base), box-shadow var(--transition-base),
    color var(--transition-base);
}
.footer__address-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}
.footer__address-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(37, 99, 235, 0.12);
  color: white;
}
.footer__address-card:hover::before {
  transform: scaleX(1);
}
.footer__address-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  color: var(--color-primary-light);
  transition: transform var(--transition-base), background var(--transition-base),
    color var(--transition-base);
}
.footer__address-card:hover .footer__address-icon {
  transform: scale(1.08) translateY(-1px);
  background: rgba(37, 99, 235, 0.35);
  color: white;
}
.footer__address-icon svg {
  width: 18px;
  height: 18px;
}
.footer__address-text {
  font-size: 0.875rem;
  line-height: 1.55;
  font-style: normal;
}
@media (prefers-reduced-motion: reduce) {
  .footer__address-card,
  .footer__address-card::before,
  .footer__address-icon {
    transition: none;
  }
  .footer__address-card:hover {
    transform: none;
  }
  .footer__address-card:hover .footer__address-icon {
    transform: none;
  }
}
.footer__column h3,
.footer__column h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer__link {
  color: var(--color-text-lighter);
  transition: color var(--transition-fast);
}
.footer__link:hover {
  color: white;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--color-text-lighter);
}
.footer__bottom p {
  color: inherit;
}
.footer__bottom a {
  color: inherit;
  transition: color var(--transition-fast);
}
.footer__bottom a:hover {
  color: white;
}
@media (max-width: 1024px) {
  .footer__main {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__brand {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .footer__main {
    grid-template-columns: 1fr;
  }
  .footer__brand {
    grid-column: span 1;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
.service-hero {
  position: relative;
  padding: 140px 0 100px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
}
.service-hero__bg {
  position: absolute;
  inset: 0;
}
@media (max-width: 1024px) {
  .service-hero {
    padding: 120px 0 80px;
  }
}
@media (max-width: 768px) {
  /* Adjust specs card on mobile to ensure it doesn't block image */
  /* Left-align breadcrumb and tech badge on mobile */
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
}
.breadcrumb a {
  color: var(--color-primary);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* Light variant for parts grid inside what-we-build--alt */

/* ========================================
   Industry Pages - Additional Styles
   ======================================== */

/* Section Tag */

/* Applications List */

/* Process Section */


/* Intro Section */

/* Applications Section with Image */

/* CAD Callout */

/* Quote Section with Image */

/* Parts Grid Features Variant */

/* What We Build Alt Background */

/* Temporary closure notice (instant quote & contact) */

/* ===== SLS service page (photo-led, full-bleed) ===== */

/* Spec strip overlapping hero */

/* Section header compact */

/* Inline links in location page cards are underlined, not just coloured */

/* Hidden from view, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Links inside section intros, step text and limit notes are underlined, not just coloured */

/* Gallery grid */

/* Material + process */

/* Finishing & colour */

/* Compare */

/* FAQ accordion */

/* Comparison table row links */

/* Link to the dyeing blog post */

/* ===== SLA service page (resin library) ===== */
/* Studio hero: no photo, a tray of resin samples is the visual */

/* Job selector: pick what the part has to do, see the resin */
@keyframes ma-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* Full resin library: filters + cards */
@keyframes ma-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Surface roughness chart (dark finishing panel) */

/* ===== 3D printing services hub (photo-led, expanding process columns) =====
   Scoped to main.pc-page. Reuses .ma-sh, .ma-compare and .ma-faq from the SLS page. */

/* First screen */

/* Expanding photo columns */
/* Details reveal: animates height with the 0fr -> 1fr grid trick */
/* Readability: a solid backing fades in behind the text when a column opens */
/* The whole card links to its process page; an arrow badge shows once it's open */

/* How it works: one example order, day by day */

/* Specs, folded away for the people who want them */

/* Condensed page: smaller section headings than the site default */

/* Short laptop screens: keep columns tall enough for the details */
@media (min-width: 1025px) and (max-height: 760px) {
  /* Short screens: hide the "best for" line while a column is open */
}

@media (max-width: 1024px) {
  /* Tablets and phones: swipeable cards; tap one to open its details */
}
/* Proof strip at the top of "How it works" */

/* ===== 3D scanning service page (original -> scan -> new piece) =====
   Scoped to main.sc-page. Reuses .ma-hero/.ma-studio, .ma-strip, .ma-sh,
   .ma-finder, .ma-tile and .ma-faq from the SLS and SLA pages. */

/* Hero visual: one object as a deck of cards. Position 0 is the front card,
   1 waits on the right, 2 on the left. */
/* Auto-advance: the active step's bar fills and the deck moves on when the
   animation ends. Hover, focus or scrolling away pauses it; a click stops it. */
@keyframes sc-fill {
  to {
    width: 100%;
  }
}

/* Highlights card overlapping the hero, in place of a spec strip */

/* Job picker: photos instead of resin samples */
/* Original / 3D scan side by side in a picker panel */
/* Scans on a dark studio background: show the whole piece */

/* Big projects & proven results: dark band, photo mosaic + side panel */
/* Client logos, knocked out to white on the dark band */
/* Pure-black source art inverts to full white; dim it to match the raster logos */

/* ===== FDM service page (proven jobs, material ladders, compare-all chart) ===== */
/* ===== FDM service page: shared bits (reuses the .ma-* system in styles.css) ===== */

/* Hero: full-bleed photo of a real batch, text on the left */
/* Spec strip sits between the hero and the dark proof band */

/* Dark band: same navy as the hero, blue accents only */

/* What FDM is best at: real jobs on the dark band */

/* Materials: good / better / best by need */

/* Materials view switch: simple picker <-> full table */

/* Colours in stock */

/* How it works: photo + four steps (reuses the SLS process layout) */

/* Design considerations: infill demo + design limits */

/* ===== Free DFM check page (loaded after styles.css) =====
   Base styles come from /styles.css (purged for this page by scripts/build-dfm.mjs); everything below is new. The tool's own
   styles (the card, upload form, progress and results) live in /dfm-tool.css. This file only uses the variables defined in styles.css.

   The page: centred hero with the tool in a wide slot, 01 Design rules by process (three columns with rule-set tabs, diagrams
   that draw in, material chips, the full generated table in a <details>), 02 How it works, 03 For assistants and scripts,
   05 FAQ and the closing band. Scroll-reveal and the diagram draw-in are class toggles set by the small inline script at the end
   of dfm-check.html; both are skipped under prefers-reduced-motion. The hero text never starts hidden. */

:root {
  --dfm-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dfm-amber-ink: #b45309;
  --dfm-ok-ink: var(--color-accent-dark);
  --dfm-info-ink: #475569;
}
section[id] {
  scroll-margin-top: 5rem;
}

/* ---------- Hero ---------- */
.dfm-hero.service-hero {
  padding: 116px 0 72px;
  overflow: visible; /* the tool's sticky viewer needs a visible ancestor */
}
.dfm-hero .service-hero__bg {
  overflow: hidden;
}
.dfm-hero__text {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.dfm-hero .breadcrumb {
  justify-content: center;
  margin-bottom: 1.25rem;
}
.dfm-hero__title {
  max-width: 780px;
  margin: 0 auto 1rem;
  font-size: clamp(2.125rem, 4.6vw, 3.5rem);
  text-wrap: balance;
}
.dfm-hero__title .text-gradient {
  white-space: nowrap;
}
.dfm-hero__lead {
  max-width: 660px;
  margin: 0 auto 1.5rem;
  font-size: 1.125rem;
  text-wrap: balance;
}
.dfm-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  padding: 0;
  list-style: none;
}
.dfm-points li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-light);
}
.dfm-points svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}
.dfm-points strong {
  font-family: var(--font-heading);
  color: var(--color-secondary);
}
/* The tool slot: centred, wide, full width on small screens. The card look and the result widening are in dfm-tool.css. */
.dfm-hero__tool {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1160px;
  margin: 2rem auto 0;
  min-width: 0;
}

/* ---------- Shared section pattern ---------- */
.dfm-sec {
  padding: 5rem 0;
}
.dfm-sec--alt {
  background: var(--color-background-alt);
}
.dfm-head {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.dfm-head h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  text-wrap: balance;
}
.dfm-head p {
  font-size: 1.125rem;
  text-wrap: balance;
}
.dfm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.dfm-eyebrow__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}
/* In-copy links are underlined, not just coloured */
.dfm-more a,
.dfm-metal a,
.dfm-faq p a,
.dfm-agent a,
.dfm-step__text a,
.dfm-cta__links a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.dfm-more a,
.dfm-metal a,
.dfm-faq p a,
.dfm-agent a,
.dfm-step__text a {
  color: var(--color-primary);
}
.dfm-more a:hover,
.dfm-metal a:hover,
.dfm-faq p a:hover,
.dfm-agent a:hover,
.dfm-step__text a:hover {
  color: var(--color-primary-dark);
}
.industry-cta .dfm-cta__links {
  max-width: 640px;
  margin: 2rem auto 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}
.dfm-cta__links a {
  color: white;
}

/* Scroll-reveal. Only below-the-fold blocks carry .dfm-rv; they start at 0.01 so nothing is ever fully hidden. */
.js .dfm-rv {
  opacity: 0.01;
  transform: translateY(18px);
  transition: opacity 0.7s var(--dfm-ease), transform 0.7s var(--dfm-ease);
}
.js .dfm-rv.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 01 Design rules by process ---------- */
.dfm-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.dfm-rule {
  position: relative;
  min-width: 0;
  padding: 1.5rem 1.25rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.dfm-rule::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.25rem;
  width: 3rem;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--gradient-primary);
}
.dfm-rule__h {
  margin-bottom: 1rem;
}
.dfm-rule__h h3 {
  font-size: 1.5rem;
}
.dfm-rule__h h3 span {
  font: 500 0.9375rem var(--font-body);
  color: var(--color-text-light);
}
.dfm-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-lg);
  background: #eef2f7;
}
.dfm-tab {
  flex: 1;
  min-height: 40px;
  padding: 0 0.5rem;
  border-radius: var(--radius-md);
  font: 700 0.875rem var(--font-heading);
  color: var(--color-text-light);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.dfm-tab:hover {
  color: var(--color-primary);
}
.dfm-tab:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 1px;
}
.dfm-tab[aria-selected="true"] {
  background: white;
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}
.dfm-tab:only-child {
  cursor: default;
}
.dfm-panel:not([hidden]) {
  animation: dfm-swap 0.4s var(--dfm-ease);
}
@keyframes dfm-swap {
  from {
    opacity: 0.01;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dfm-rows {
  padding: 0;
  list-style: none;
}
.dfm-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eef2f7;
}
.dfm-row:last-child {
  border-bottom: 0;
}
.dfm-row__t {
  display: grid;
  gap: 0.0625rem;
  min-width: 0;
}
.dfm-row__k {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
}
.dfm-row__v {
  font: 800 1.1875rem/1.2 var(--font-heading);
  color: var(--color-secondary);
}
.dfm-row__n {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-text-light);
}
/* Diagrams: the dimension lines draw in when the column scrolls into view or the rule set changes */
.dfm-dia {
  width: 104px;
  height: 76px;
  border-radius: var(--radius-md);
  background: var(--color-background-alt);
}
.dfm-dia .sh {
  fill: #dbe5f6;
  stroke: #94a3b8;
  stroke-width: 1.2;
}
.dfm-dia .cut {
  fill: white;
  stroke: #94a3b8;
  stroke-width: 1.2;
}
.dfm-dia .edge {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.2;
}
.dfm-dia .void {
  fill: #f1f5f9;
  stroke: #94a3b8;
  stroke-width: 1.2;
  stroke-dasharray: 3 2.5;
}
.dfm-dia .info {
  fill: white;
  stroke: #94a3b8;
  stroke-width: 1.2;
}
.dfm-dia .info-i {
  fill: none;
  stroke: #64748b;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.dfm-dia .gd {
  fill: none;
  stroke: #93c5fd;
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.dfm-dia .dim {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.js .dfm-rule .dfm-dia .dim {
  stroke-dashoffset: 1;
}
.js .dfm-rule .dfm-dia .gd {
  opacity: 0;
}
.dfm-rule.is-drawn .dfm-dia .dim {
  animation: dfm-dim 0.9s calc(0.25s + var(--r, 0) * 0.14s + var(--c, 0) * 0.1s) var(--dfm-ease) forwards;
}
.dfm-rule.is-drawn .dfm-dia .gd {
  animation: dfm-fade 0.5s calc(0.15s + var(--r, 0) * 0.14s + var(--c, 0) * 0.1s) forwards;
}
@keyframes dfm-dim {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes dfm-fade {
  to {
    opacity: 1;
  }
}
.dfm-mats {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--color-border);
}
.dfm-mats__k {
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
}
.dfm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0;
  list-style: none;
}
.dfm-chips li {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-background-alt);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-secondary);
  white-space: nowrap;
}
.dfm-mat-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-light);
}
.dfm-dots {
  display: none;
}
.dfm-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.dfm-legend li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  color: var(--color-text-light);
}
.dfm-legend svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.125rem;
}
.dfm-legend strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-secondary);
}
.dfm-legend .is-ok svg {
  color: var(--dfm-ok-ink);
}
.dfm-legend .is-warn svg {
  color: var(--dfm-amber-ink);
}
.dfm-legend .is-info svg {
  color: var(--dfm-info-ink);
}
.dfm-more {
  display: grid;
  gap: 0.5rem;
  max-width: 900px;
  margin: 1.5rem auto 0;
  font-size: 0.9375rem;
  text-align: center;
  text-wrap: pretty;
}
.dfm-more strong {
  color: var(--color-secondary);
}

/* The full table (generated by scripts/build-dfm.mjs between the dfm-limits markers) */
.dfm-full {
  max-width: 1000px;
  margin: 2rem auto 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.dfm-full > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font: 700 1.0625rem var(--font-heading);
  color: var(--color-secondary);
}
.dfm-full > summary::-webkit-details-marker {
  display: none;
}
.dfm-full > summary span {
  font: 500 0.875rem var(--font-body);
  color: var(--color-text-light);
}
.dfm-full > summary:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}
.dfm-full[open] > summary {
  border-bottom: 1px solid var(--color-border);
}
.dfm-table-wrap {
  overflow-x: auto;
  padding: 0.25rem 0.5rem 0.75rem;
}
.dfm-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.dfm-table th,
.dfm-table td {
  padding: 0.5rem 0.625rem;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  color: var(--color-text);
}
.dfm-table thead th {
  font: 700 0.75rem var(--font-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: white;
}
.dfm-table__proc {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  white-space: nowrap;
}
.dfm-table tbody + tbody th[scope="rowgroup"],
.dfm-table tbody + tbody tr:first-child td {
  border-top: 2px solid var(--color-border);
}
.dfm-metal {
  margin: 0;
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
}

/* ---------- 03 How it works ---------- */
.dfm-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}
.dfm-steps::before {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s 0.2s var(--dfm-ease);
}
.dfm-steps.is-in::before,
html:not(.js) .dfm-steps::before {
  transform: scaleX(1);
}
.dfm-step {
  position: relative;
  padding: 0 0.5rem;
  text-align: center;
}
.dfm-step__n {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 6px var(--color-background-alt);
  color: var(--color-primary-dark);
  font: 800 1.0625rem var(--font-heading);
}
.dfm-step__title {
  margin-bottom: 0.25rem;
  font-size: 1.0625rem;
}
.dfm-step__text {
  font-size: 0.875rem;
  line-height: 1.5;
}
.dfm-how__note {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9375rem;
}

/* ---------- 04 For assistants and scripts ---------- */
.dfm-agent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 2rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.dfm-agent__code {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-background-dark);
  color: #e2e8f0;
  font: 500 0.8125rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.dfm-agent__code b {
  color: #7dd3fc;
  font-weight: 500;
}
.dfm-agent ul {
  display: grid;
  gap: 0.625rem;
  padding-left: 1.125rem;
  font-size: 0.9375rem;
  color: var(--color-text-light);
}
.dfm-agent li::marker {
  color: var(--color-primary);
}
.dfm-agent li {
  overflow-wrap: anywhere;
}

/* ---------- 05 FAQ ---------- */
.dfm-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
.dfm-faq details {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dfm-faq details[open] {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
}
.dfm-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 1.125rem;
  cursor: pointer;
  list-style: none;
  font: 700 1rem var(--font-heading);
  color: var(--color-secondary);
}
.dfm-faq summary::-webkit-details-marker {
  display: none;
}
.dfm-faq summary:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-lg);
}
.dfm-faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.3s var(--dfm-ease);
}
.dfm-faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.dfm-faq p {
  padding: 0 1.125rem 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  animation: dfm-swap 0.35s var(--dfm-ease) both;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .dfm-rules {
    display: flex;
    gap: 1rem;
    margin: 0 -1.5rem;
    padding: 0.5rem 1.5rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 1.5rem;
    scrollbar-width: none;
  }
  .dfm-rules::-webkit-scrollbar {
    display: none;
  }
  .dfm-rule {
    flex: 0 0 min(86%, 380px);
    scroll-snap-align: center;
  }
  .dfm-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
  }
  .dfm-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s, width 0.2s;
  }
  .dfm-dots i.is-on {
    width: 22px;
    border-radius: 4px;
    background: var(--color-primary);
  }
  .dfm-legend {
    grid-template-columns: 1fr;
  }
  .dfm-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 1rem;
  }
  .dfm-steps::before {
    display: none;
  }
  .dfm-faq {
    grid-template-columns: 1fr;
  }
  .dfm-agent {
    grid-template-columns: 1fr;
  }
  .dfm-agent__code {
    overflow-x: auto;
  }
}
@media (max-width: 760px) {
  .dfm-hero.service-hero {
    padding: 96px 0 48px;
  }
  .dfm-hero__tool {
    margin-top: 1.5rem;
  }
  .dfm-sec {
    padding: 3.5rem 0;
  }
  .dfm-points {
    display: grid;
    justify-content: center;
    justify-items: start;
    gap: 0.5rem;
  }
  .dfm-points li {
    align-items: flex-start;
    text-align: left;
  }
  .dfm-points strong {
    display: block;
  }
  .dfm-points svg {
    margin-top: 0.1875rem;
  }
}
@media (max-width: 560px) {
}
@media (max-width: 420px) {
  .dfm-steps {
    grid-template-columns: 1fr;
  }
  .dfm-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.75rem;
  }
  .dfm-dia {
    width: 88px;
    height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .dfm-rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js .dfm-rule .dfm-dia .dim {
    stroke-dashoffset: 0;
  }
  .js .dfm-rule .dfm-dia .gd {
    opacity: 1;
  }
  .dfm-rule.is-drawn .dfm-dia .dim,
  .dfm-rule.is-drawn .dfm-dia .gd,
  .dfm-panel:not([hidden]),
  .dfm-faq p {
    animation: none;
  }
  .dfm-steps::before {
    transform: scaleX(1);
    transition: none;
  }
}

/*
 * DFM check tool (the card on /dfm-check), "Pre-flight checklist" design. BEM block: dfm-tool.
 * Uses the styles.css variables. The amber review colours and the green pass colours have no site variable,
 * so they are scoped tokens on .dfm-tool.
 *
 * Do not put transform, filter, contain or will-change on .dfm-tool or its stages: the mobile summary bar is
 * position: fixed and would then be positioned against the card instead of the screen. (dfm-check.js animates the card's
 * height and max-width, and a stage's opacity and translate, with the Web Animations API, only while a swap runs.)
 *
 * Layout stability: every block that changes between stages keeps its size (the verdict head, the chip row, the checklist
 * rows, the viewer, the footer, the progress line, the Turnstile box), so progress turns into the result without a
 * single pixel moving. What does come and go (picker, confirm, notices) slides open and shut in dfm-check.js.
 */
.dfm-tool {
  --dfm-amber: #f59e0b;
  --dfm-amber-ink: #b45309;
  --dfm-amber-bg: #fffbeb;
  --dfm-amber-line: #fde68a;
  --dfm-ok: #047857;
  --dfm-ok-bg: #ecfdf5;
  --dfm-ok-line: #a7f3d0;
  --dfm-info: #475569;
  --dfm-line: #cbd5e1;
  --dfm-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dfm-ring: var(--color-primary-light);
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding: 1.75rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}
.dfm-tool[data-stage="work"] { max-width: 1160px; }
/* While the card eases between two sizes (dfm-check.js) the content is cut at its edge. clip, unlike hidden, keeps the
   sticky viewer working. */
.dfm-tool.is-morph { overflow: clip; }
@media (max-width: 760px) {
  .dfm-tool { padding: 1.125rem 1rem; border-radius: var(--radius-xl); }
}
.dfm-tool [hidden] { display: none !important; }
.dfm-tool *,
.dfm-tool *::before,
.dfm-tool *::after { box-sizing: border-box; }
.dfm-tool a { color: var(--color-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dfm-tool a:hover { color: var(--color-primary-dark); }
:where(.dfm-tool) :where(h2, h3, p, ul, ol, fieldset, legend) { margin: 0; padding: 0; }
:where(.dfm-tool) :where(fieldset) { border: 0; min-width: 0; }
:where(.dfm-tool) :where(ul, ol) { list-style: none; }

/* Focus */
.dfm-tool :focus { outline: none; }
.dfm-tool :focus-visible { outline: 3px solid var(--dfm-ring); outline-offset: 2px; }
.dfm-tool [tabindex="-1"]:focus,
.dfm-tool [tabindex="-1"]:focus-visible { outline: none; }

/* Screen-reader helpers */
.dfm-tool__vh,
.dfm-tool__status {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Shared text */
.dfm-tool__title {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-secondary);
}
.dfm-tool__h3 {
  margin: 0.75rem 0 0.625rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-secondary);
}
.dfm-tool__lead { margin: 0 0 1rem; }
.dfm-tool__help { margin-top: 0.375rem; font-size: 0.8125rem; line-height: 1.45; color: var(--color-text-light); }
.dfm-tool__privacy { margin-top: 0.5rem; }
.dfm-tool__noscript { margin: 0 0 1rem; padding: 0.75rem 1rem; background: var(--color-background-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.dfm-tool__loading,
.dfm-tool__opt { color: var(--color-text-light); font-weight: 400; }
.dfm-tool__loading { padding: 0.625rem 0.5rem; font-size: 0.9375rem; grid-column: 1 / -1; }
.dfm-tool__error { margin-top: 0.375rem; font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--color-canada); }
.dfm-tool__error-msg { margin-bottom: 0.5rem; }
.dfm-tool__summary { margin: 1rem 0 0; }

/* Banners and notices */
.dfm-tool__banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  background: var(--dfm-amber-bg);
  border: 1px solid var(--dfm-amber-line);
  border-left-width: 4px;
  border-radius: var(--radius-md);
}
.dfm-tool__banner-msg,
.dfm-tool__banner-hint { margin: 0; }
.dfm-tool__banner-hint { margin-top: 0.25rem; font-size: 0.875rem; color: var(--color-text-light); }
.dfm-tool__notice { margin: 0.75rem 0; padding: 0.75rem 1rem; font-size: 0.9375rem; background: var(--color-background-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.dfm-tool__notice--ok { background: var(--dfm-ok-bg); border-color: var(--dfm-ok-line); color: var(--dfm-ok); font-weight: 600; }

/* ---------------------------------------------------------------- form */
.dfm-tool__formgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; }
@media (max-width: 760px) { .dfm-tool__formgrid { grid-template-columns: 1fr; gap: 1.5rem; } }
.dfm-tool__col { display: flex; flex-direction: column; gap: 1.125rem; min-width: 0; }
.dfm-tool__col--file { gap: 0; }
/* The spacing between the steps is a margin on the step, not a flex gap, so a step can slide open without a jump. */
.dfm-tool__steps { counter-reset: dfm-step; gap: 0; }
.dfm-tool__steps > :not([hidden]) ~ :not([hidden]) { margin-top: 1.125rem; }
.dfm-tool__step { min-width: 0; }
.dfm-tool__step:not([hidden]) { counter-increment: dfm-step; }
.dfm-tool__label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 0.625rem;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-secondary);
}
.dfm-tool__label--plain { font-size: 0.9375rem; }
.dfm-tool__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: var(--radius-full);
  background: rgb(37 99 235 / 0.1);
  color: var(--color-primary-dark);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.dfm-tool__num::before { content: counter(dfm-step); }
.dfm-tool__field { margin: 0 0 1.125rem; min-width: 0; }
.dfm-tool__input,
.dfm-tool__select {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.6875rem 0.875rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--dfm-line);
  border-radius: var(--radius-md);
}
.dfm-tool__select { margin-top: 0.625rem; }
.dfm-tool__textarea { min-height: 5.5rem; resize: vertical; }
.dfm-tool__code { max-width: 14rem; font-family: var(--font-heading); font-size: 1.25rem; letter-spacing: 0.15em; }
.dfm-tool__input:focus-visible,
.dfm-tool__select:focus-visible { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgb(59 130 246 / 0.2); }
.dfm-tool__input[aria-invalid="true"] { border-color: var(--color-canada); }
.dfm-tool__select:disabled { background: var(--color-background-alt); color: var(--color-text-light); }

/* Drop zone: the real file input covers the whole zone */
.dfm-tool__drop {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 260px;
  padding: 1.5rem;
  text-align: center;
  background: var(--color-background-alt);
  border: 2px dashed var(--dfm-line);
  border-radius: var(--radius-xl);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
@media (max-width: 760px) { .dfm-tool__drop { min-height: 170px; padding: 1rem; } }
.dfm-tool__drop:hover,
.dfm-tool__drop.is-dragging { border-color: var(--color-primary); background: #eff6ff; }
.dfm-tool__drop:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgb(59 130 246 / 0.2); }
.dfm-tool__drop.is-filled { border-style: solid; border-color: var(--dfm-ok-line); background: var(--dfm-ok-bg); }
.dfm-tool__file { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.dfm-tool__drop-icon { display: inline-flex; min-width: 84px; min-height: 84px; color: var(--color-primary); }
.dfm-tool__drop-icon svg { width: 84px; height: 84px; stroke-width: 1.4; }
@media (max-width: 760px) { .dfm-tool__drop-icon { min-width: 56px; min-height: 56px; } .dfm-tool__drop-icon svg { width: 56px; height: 56px; } }
.dfm-tool__drop.is-filled .dfm-tool__drop-icon { color: var(--dfm-ok); }
.dfm-tool__drop-title { max-width: 100%; font-family: var(--font-heading); font-size: 1.125rem; font-weight: 700; color: var(--color-secondary); overflow-wrap: anywhere; }
.dfm-tool__drop-sub { max-width: 100%; font-size: 0.875rem; color: var(--color-text-light); overflow-wrap: anywhere; }

/* Segmented control (process) */
.dfm-tool__seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.25rem;
  min-height: 3.75rem;
  padding: 0.25rem;
  background: #eef2f7;
  border-radius: var(--radius-lg);
}
.dfm-tool__seg-input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.dfm-tool__seg-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.25rem;
  text-align: center;
  line-height: 1.2;
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.dfm-tool__seg-label:hover { color: var(--color-secondary); }
.dfm-tool__seg-main { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; }
.dfm-tool__seg-sub { font-size: 0.6875rem; opacity: 0.85; }
.dfm-tool__seg-input:checked + .dfm-tool__seg-label { background: #fff; color: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.dfm-tool__seg-input:focus-visible + .dfm-tool__seg-label { outline: 3px solid var(--dfm-ring); outline-offset: 1px; }

/* Units */
.dfm-tool__units { padding: 0.875rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; }
.dfm-tool__radios { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.dfm-tool__radio { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-size: 0.9375rem; cursor: pointer; }
.dfm-tool__radio input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--color-primary); }
.dfm-tool__radio:has(input:focus-visible) { outline: 3px solid var(--dfm-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Turnstile */
/* The widget is 65 px high: the box keeps that height from the moment it is shown, and the status line above it keeps its
   line, so the widget loading in later moves nothing. */
.dfm-tool__ts-box { min-height: 65px; max-width: 100%; overflow: hidden; }
.dfm-tool__ts-box > div { transform: scale(var(--dfm-ts-scale, 1)); transform-origin: 0 0; }
.dfm-tool__ts .dfm-tool__help { margin: 0 0 0.375rem; min-height: 1.45em; }
.dfm-tool__submit-hint { min-height: 1.45em; text-align: center; }

/* Buttons */
.dfm-tool__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--color-secondary);
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.dfm-tool__btn--block { display: flex; width: 100%; }
.dfm-tool a.dfm-tool__btn { text-decoration: none; font-weight: 700; }
.dfm-tool__btn--primary,
.dfm-tool a.dfm-tool__btn--primary { color: #fff; background: var(--gradient-primary); box-shadow: 0 6px 16px -4px rgb(37 99 235 / 0.5); }
.dfm-tool__btn--primary:hover,
.dfm-tool a.dfm-tool__btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgb(37 99 235 / 0.6); }
.dfm-tool__btn--ghost,
.dfm-tool a.dfm-tool__btn--ghost { color: var(--color-secondary); background: #fff; border-color: var(--color-border); }
.dfm-tool__btn--ghost:hover,
.dfm-tool a.dfm-tool__btn--ghost:hover { color: var(--color-primary); border-color: var(--color-primary); }
.dfm-tool__btn--danger { color: #fff; background: var(--color-canada); }
.dfm-tool__btn--danger:hover { background: #b91c1c; }
.dfm-tool__btn:disabled,
.dfm-tool__btn[aria-disabled="true"] { color: var(--color-text-light); background: var(--color-border); border-color: transparent; box-shadow: none; transform: none; cursor: not-allowed; }
.dfm-tool__link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.dfm-tool__link-btn:hover { color: var(--color-primary-dark); }
.dfm-tool__link-btn:disabled { color: var(--color-text-light); text-decoration: none; cursor: not-allowed; }
.dfm-tool__actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin: 1rem 0; }

/* ---------------------------------------------------------------- workspace */
@keyframes dfm-tool-fade { from { opacity: 0.01; } to { opacity: 1; } }
@keyframes dfm-tool-pop-in { from { opacity: 0.01; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dfm-tool-pop { 0% { transform: scale(0.4); opacity: 0.01; } 100% { transform: none; opacity: 1; } }
@keyframes dfm-tool-rot { to { transform: rotate(360deg); } }

.dfm-tool__head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0 1.125rem; padding-bottom: 1.25rem; }
.dfm-tool__vicon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-full); background: #eff6ff; color: var(--color-primary); }
.dfm-tool__vicon svg { grid-area: 1 / 1; width: 28px; height: 28px; opacity: 0; transform: scale(0.5); transition: opacity 0.25s, transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.dfm-tool__head[data-mode="progress"] .i-spin,
.dfm-tool__head[data-verdict="review"] .i-warn,
.dfm-tool__head[data-verdict="passed"] .i-ok { opacity: 1; transform: none; }
.dfm-tool__head[data-mode="progress"] .i-spin { animation: dfm-tool-rot 1.1s linear infinite; }
.dfm-tool__head[data-verdict="review"] .dfm-tool__vicon { background: var(--dfm-amber-bg); color: var(--dfm-amber-ink); box-shadow: 0 0 0 6px rgb(245 158 11 / 0.12); }
.dfm-tool__head[data-verdict="passed"] .dfm-tool__vicon { background: var(--dfm-ok-bg); color: var(--dfm-ok); box-shadow: 0 0 0 6px rgb(16 185 129 / 0.14); }
.dfm-tool__kicker { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-primary); }
.dfm-tool__head[data-verdict="review"] .dfm-tool__kicker { color: var(--dfm-amber-ink); }
.dfm-tool__head[data-verdict="passed"] .dfm-tool__kicker { color: var(--dfm-ok); }
.dfm-tool__headline { scroll-margin-top: 6rem; margin: 0.125rem 0; font-family: var(--font-heading); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--color-secondary); text-wrap: balance; }
.dfm-tool__head-sub { font-size: 0.9375rem; color: var(--color-text-light); text-wrap: pretty; overflow-wrap: anywhere; }
/* The head is as tall as what it holds: the verdict's own summary and the buttons it really has. When the result arrives
   the head eases to that height (dfm-check.js, morphBox) instead of reserving room for a case that may never come. */
/* The progress block and the action buttons share one grid cell: the cell is as high as the taller of the two, the one that
   is not in use is invisible and cannot be reached. */
.dfm-tool__head-prog,
.dfm-tool__head-act { grid-column: 2 / -1; grid-row: 2; margin-top: 0.875rem; transition: opacity 0.25s var(--dfm-ease), visibility 0s; }
.dfm-tool__head-prog { display: grid; align-content: start; gap: 0.25rem; max-width: 520px; width: 100%; }
.dfm-tool__head-act { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.5rem; }
.dfm-tool__head[data-mode="progress"] .dfm-tool__head-act,
.dfm-tool__head[data-mode="result"] .dfm-tool__head-prog { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 0.2s, visibility 0s 0.2s; }
.dfm-tool__head[data-mode="result"] .dfm-tool__head-act { transition-delay: 0.15s; }
.dfm-tool__head.is-reveal .dfm-tool__vicon { animation: dfm-tool-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.dfm-tool__head.is-reveal .dfm-tool__head-text,
.dfm-tool__head.is-reveal .dfm-tool__head-act { animation: dfm-tool-pop-in 0.55s 0.12s var(--dfm-ease) both; }
.dfm-tool__bar { position: relative; height: 8px; overflow: hidden; background: #e8eef6; border-radius: var(--radius-full); }
.dfm-tool__bar-fill { height: 100%; width: 0; background: var(--gradient-accent); border-radius: inherit; transition: width 0.45s var(--dfm-ease); }
.dfm-tool__bar.is-indeterminate .dfm-tool__bar-fill { position: absolute; inset: 0 auto 0 0; width: 35%; animation: dfm-tool-slide 1.4s ease-in-out infinite; }
@keyframes dfm-tool-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.dfm-tool__prog-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; }
.dfm-tool__barlabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--color-text-light); }

.dfm-tool__limits { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.375rem; min-height: calc(1.875rem + 1.25rem); padding-bottom: 1.25rem; }
.dfm-tool__limits li { display: inline-flex; align-items: center; min-height: 1.875rem; max-width: 100%; padding: 0.25rem 0.625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-background-alt); font-size: 0.8125rem; font-weight: 600; color: var(--color-secondary); animation: dfm-tool-fade 0.3s var(--dfm-ease) both; }
.dfm-tool__limits li:first-child { background: #eff6ff; border-color: #bfdbfe; color: var(--color-primary-dark); }
/* the placeholders shown while the check runs */
.dfm-tool__limits li.is-skel { border-color: transparent; background: linear-gradient(100deg, #f1f5f9 20%, #e6edf6 50%, #f1f5f9 80%) 0 0 / 250% 100%; animation: dfm-tool-shimmer 2s ease-in-out infinite; }
.dfm-tool__limits li.is-skel:nth-child(1) { width: 6rem; }
.dfm-tool__limits li.is-skel:nth-child(2) { width: 9rem; }
.dfm-tool__limits li.is-skel:nth-child(3) { width: 7rem; }
@media (max-width: 760px) {
  .dfm-tool__limits { min-height: calc(2 * 1.875rem + 0.375rem + 1.25rem); }
  .dfm-tool__limits li:nth-child(n + 4) { display: none; }
}
.dfm-tool__hint { margin: -0.5rem 0 1.25rem; padding: 0.625rem 0.875rem; font-size: 0.875rem; background: var(--dfm-amber-bg); border-left: 4px solid var(--dfm-amber-line); border-radius: var(--radius-sm); }

/* Two columns whenever there is a viewer. Without one (no WebGL, a file too large to show) the first column has no width
   and no gap, from the first frame; if the viewer is given up on later the columns ease to that state instead of jumping. */
.dfm-tool__grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); column-gap: 1.5rem; row-gap: 1.5rem; align-items: start; transition: grid-template-columns 0.35s var(--dfm-ease), column-gap 0.35s var(--dfm-ease); }
.dfm-tool__grid[data-viewer="none"] { grid-template-columns: minmax(0, 0fr) minmax(0, 1fr); column-gap: 0; }
.dfm-tool__grid[data-viewer="none"] .dfm-tool__viewer-wrap { max-height: 0; opacity: 0; visibility: hidden; overflow: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0s 0.2s, max-height 0.35s var(--dfm-ease); }
.dfm-tool__grid[data-viewer="none"] .dfm-tool__side { max-width: 52rem; }
.dfm-tool__viewer-wrap { position: sticky; top: 92px; display: grid; gap: 0.625rem; min-width: 0; max-height: 40rem; transition: max-height 0.35s var(--dfm-ease); }
@media (max-height: 700px) { .dfm-tool__viewer-wrap { position: static; } }
@media (max-width: 960px) {
  .dfm-tool__grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .dfm-tool__grid[data-viewer="none"] { grid-template-columns: minmax(0, 1fr); }
  .dfm-tool__grid[data-viewer="none"] .dfm-tool__viewer-wrap { display: none; }
  .dfm-tool__grid[data-viewer="none"] .dfm-tool__side { max-width: none; }
  .dfm-tool__viewer-wrap { position: static; }
}

/* ---------------------------------------------------------------- viewer */
.dfm-tool__viewer-stage {
  position: relative;
  height: clamp(360px, 46vw, 520px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, #f1f5f9 55%, #e2e8f0 100%);
}
@media (max-width: 960px) { .dfm-tool__viewer-stage { height: clamp(250px, 62vw, 340px); } }
@media (max-width: 760px) {
  .dfm-tool__viewer-btns { flex-direction: column; gap: 0.25rem; }
  .dfm-tool__viewer-chip { max-width: calc(100% - 7rem); }
}
/* While a failed check or a quote step is on screen the card keeps the height it had (dfm-check.js sets min-height), so a late
   answer from the server moves nothing; the message sits in the middle. It lets go when the visitor acts. */
.dfm-tool[data-held="error"] { max-width: 1160px; display: flex; flex-direction: column; justify-content: center; }
/* The viewer waits for a tap (a STEP file on a phone): the stage keeps its size and the button sits in it. */
.dfm-tool__grid[data-viewer="button"] .dfm-tool__viewer-wrap > * { grid-area: 1 / 1; }
.dfm-tool__grid[data-viewer="button"] [data-dfm="viewer-load"] { z-index: 2; align-self: center; justify-self: center; width: auto; max-width: calc(100% - 2rem); margin: 0; }
/* While it loads, a quiet sweep over the stage shows where the model will be. */
.dfm-tool__grid[data-viewer="loading"] .dfm-tool__viewer-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgb(255 255 255 / 0.7) 50%, transparent 75%) 0 0 / 250% 100%; animation: dfm-tool-shimmer 1.8s ease-in-out infinite; pointer-events: none; }
.dfm-tool__viewer-stage:fullscreen { height: 100%; border: 0; border-radius: 0; }
.dfm-tool__viewer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; animation: dfm-tool-fade 0.45s var(--dfm-ease) both; }
.dfm-tool__viewer-canvas:active { cursor: grabbing; }
.dfm-tool__viewer-canvas:focus-visible { outline: 3px solid var(--dfm-ring); outline-offset: -3px; }
.dfm-tool__viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.9375rem; color: var(--color-text-light); }
.dfm-tool__viewer-chip { position: absolute; left: 0.625rem; top: 0.625rem; max-width: calc(100% - 11rem); padding: 0.25rem 0.625rem; border-radius: var(--radius-full); background: rgb(255 255 255 / 0.92); border: 1px solid var(--color-border); font-size: 0.75rem; font-weight: 600; color: var(--color-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: var(--shadow-sm); pointer-events: none; }
.dfm-tool__viewer-chip:empty { display: none; }
.dfm-tool__viewer-btns { position: absolute; right: 0.625rem; top: 0.625rem; display: flex; gap: 0.375rem; }
.dfm-tool__viewer-btn { min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--color-secondary); background: rgb(255 255 255 / 0.92); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.dfm-tool__viewer-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.dfm-tool__viewer-tag,
.dfm-tool__viewer-scan,
.dfm-tool__viewer-hint { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; white-space: nowrap; }
.dfm-tool__viewer-tag { bottom: 0.875rem; display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.4rem 0.875rem; border-radius: var(--radius-full); background: #fff; border: 1px solid var(--dfm-ok-line); font-family: var(--font-heading); font-size: 0.875rem; font-weight: 700; color: var(--dfm-ok); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: opacity 0.4s 0.3s, visibility 0.4s 0.3s; }
.dfm-tool__viewer-tag svg { width: 16px; height: 16px; }
.dfm-tool__viewer-stage[data-phase="passed"] .dfm-tool__viewer-tag { opacity: 1; visibility: visible; }
.dfm-tool__viewer-scan { bottom: 0.875rem; padding: 0.4rem 0.875rem; border-radius: var(--radius-full); background: rgb(15 23 42 / 0.86); color: #fff; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.dfm-tool__viewer-stage[data-phase="scan"] .dfm-tool__viewer-scan { opacity: 1; visibility: visible; }
.dfm-tool__viewer-hint { top: 50%; transform: translate(-50%, -50%); padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 600; color: #fff; background: rgb(15 23 42 / 0.8); border-radius: var(--radius-md); }
.dfm-tool__viewer-cap { position: absolute; left: 0.625rem; right: 0.625rem; bottom: 0.625rem; padding: 0.625rem 0.875rem; border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.97); border: 1px solid var(--dfm-amber-line); box-shadow: var(--shadow-lg); font-size: 0.8125rem; line-height: 1.4; animation: dfm-tool-pop-in 0.3s var(--dfm-ease) both; }
.dfm-tool__viewer-cap strong { display: block; font-family: var(--font-heading); color: var(--dfm-amber-ink); font-size: 0.875rem; }

/* markers (DOM buttons positioned by dfm-viewer.js) */
.dfm-tool__viewer-markers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.dfm-tool__marker { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -1.375rem 0 0 -1.375rem; padding: 0; background: none; border: 0; cursor: pointer; pointer-events: auto; visibility: hidden; will-change: transform; }
.dfm-tool__marker-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--dfm-amber);
  border: 2px solid #fff;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.35);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.3, 1.7, 0.5, 1), opacity 0.25s;
}
.dfm-tool__marker.is-in .dfm-tool__marker-dot { transform: scale(1); opacity: 1; transition-delay: var(--d, 0s); }
.dfm-tool__marker.is-in .dfm-tool__marker-dot::after { content: ""; position: absolute; inset: -4px; border: 2px solid var(--dfm-amber); border-radius: var(--radius-full); opacity: 0; pointer-events: none; animation: dfm-tool-pulse 2.2s ease-out infinite; animation-delay: calc(var(--d, 0s) + 0.6s); }
@keyframes dfm-tool-pulse { 0% { transform: scale(0.8); opacity: 0.8; } 80%, 100% { transform: scale(2); opacity: 0; } }
.dfm-tool__marker.is-occluded .dfm-tool__marker-dot { opacity: 0.4; }
.dfm-tool__marker.is-occluded:hover .dfm-tool__marker-dot,
.dfm-tool__marker.is-occluded:focus-visible .dfm-tool__marker-dot { opacity: 1; }
.dfm-tool__marker.is-active .dfm-tool__marker-dot { transform: scale(1.3); opacity: 1; box-shadow: 0 0 0 3px var(--color-secondary), 0 4px 10px rgb(15 23 42 / 0.4); transition-delay: 0s; }
.dfm-tool__marker:focus-visible .dfm-tool__marker-dot { box-shadow: 0 0 0 3px var(--dfm-ring); }
/* while a checklist row is open, the other rows' markers recede */
.dfm-tool__viewer-stage[data-focus="wall"] .dfm-tool__marker:not([data-group="wall"]):not(.is-active) .dfm-tool__marker-dot,
.dfm-tool__viewer-stage[data-focus="detail"] .dfm-tool__marker:not([data-group="detail"]):not(.is-active) .dfm-tool__marker-dot,
.dfm-tool__viewer-stage[data-focus="holes"] .dfm-tool__marker:not([data-group="holes"]):not(.is-active) .dfm-tool__marker-dot,
.dfm-tool__viewer-stage[data-focus="cavity"] .dfm-tool__marker:not([data-group="cavity"]):not(.is-active) .dfm-tool__marker-dot,
.dfm-tool__viewer-stage[data-focus="units"] .dfm-tool__marker:not([data-group="units"]):not(.is-active) .dfm-tool__marker-dot,
.dfm-tool__viewer-stage[data-focus="other"] .dfm-tool__marker:not([data-group="other"]):not(.is-active) .dfm-tool__marker-dot { opacity: 0.28; transform: scale(0.8); }

/* ---------------------------------------------------------------- checklist */
.dfm-tool__side { min-width: 0; }
.dfm-tool__side-h { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.625rem; }
.dfm-tool__side-h h3 { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; color: var(--color-secondary); }
.dfm-tool__viewer-note { margin-top: 0.75rem; }
.dfm-tool__side-count { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-light); }
.dfm-tool__side-count b { color: var(--dfm-amber-ink); }
.dfm-tool__side-count b.ok { color: var(--dfm-ok); }
.dfm-tool__checks { display: grid; gap: 0.5rem; }
.dfm-tool__check { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; transition: border-color 0.3s, box-shadow 0.3s, background 0.4s; }
.dfm-tool__check[data-state="run"] { border-color: #bfdbfe; background: linear-gradient(100deg, #f8fbff 20%, #eaf3ff 50%, #f8fbff 80%) 0 0 / 250% 100%; animation: dfm-tool-shimmer 2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.22s); }
@keyframes dfm-tool-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.dfm-tool__check[data-state="ok"] { background: linear-gradient(#fff, #fbfefc); }
.dfm-tool__check[data-state="warn"] { border-color: var(--dfm-amber-line); background: linear-gradient(#fff, #fffdf5); }
.dfm-tool__check.is-open { border-color: var(--dfm-amber); box-shadow: var(--shadow-md); }
.dfm-tool__check.is-landed { animation: dfm-tool-flash 0.9s ease-out; }
@keyframes dfm-tool-flash { 0% { box-shadow: 0 0 0 0 rgb(37 99 235 / 0.35); } 100% { box-shadow: 0 0 0 10px rgb(37 99 235 / 0); } }
.dfm-tool__check[data-state="ok"].is-landed { animation-name: dfm-tool-flash-ok; }
@keyframes dfm-tool-flash-ok { 0% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0.4); } 100% { box-shadow: 0 0 0 10px rgb(16 185 129 / 0); } }
.dfm-tool__check-btn { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 3.9375rem; padding: 0.625rem 0.875rem; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: inherit; cursor: pointer; }
.dfm-tool__check-btn:disabled { cursor: default; }
.dfm-tool__ico { position: relative; flex: none; width: 30px; height: 30px; }
.dfm-tool__ico svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.3s; }
.dfm-tool__check[data-state="pending"] .i-pend,
.dfm-tool__check[data-state="run"] .i-run,
.dfm-tool__check[data-state="ok"] .i-ok,
.dfm-tool__check[data-state="warn"] .i-warn { opacity: 1; transform: none; }
.dfm-tool__check[data-state="run"] .i-run { animation: dfm-tool-rot 0.9s linear infinite; }
.dfm-tool__check[data-state="ok"] .i-ok,
.dfm-tool__check[data-state="warn"] .i-warn { animation: dfm-tool-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.i-ok .tick { stroke-dasharray: 24; stroke-dashoffset: 24; }
.dfm-tool__check[data-state="ok"] .i-ok .tick { animation: dfm-tool-draw 0.45s 0.15s ease-out forwards; }
@keyframes dfm-tool-draw { to { stroke-dashoffset: 0; } }
.dfm-tool__check-main { flex: 1; min-width: 0; display: grid; }
.dfm-tool__check-name { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: var(--color-secondary); }
.dfm-tool__check-sub { font-size: 0.8125rem; color: var(--color-text-light); transition: color 0.3s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfm-tool__check-sub:empty { display: none; }
.dfm-tool__check[data-state="warn"] .dfm-tool__check-sub { color: var(--dfm-amber-ink); font-weight: 600; }
.dfm-tool__check[data-state="run"] .dfm-tool__check-sub { color: var(--color-primary); }
.dfm-tool__pill { flex: none; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.625rem; border: 1px solid transparent; border-radius: var(--radius-full); font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 700; animation: dfm-tool-pop-in 0.35s var(--dfm-ease) both; }
.dfm-tool__pill svg { width: 13px; height: 13px; }
.dfm-tool__pill--warn { background: var(--dfm-amber-bg); border-color: var(--dfm-amber-line); color: var(--dfm-amber-ink); }
.dfm-tool__pill--ok { background: var(--dfm-ok-bg); border-color: var(--dfm-ok-line); color: var(--dfm-ok); }
.dfm-tool__chev { flex: none; width: 18px; height: 18px; color: var(--color-text-lighter); transition: transform 0.3s var(--dfm-ease); }
.dfm-tool__check.is-open .dfm-tool__chev { transform: rotate(180deg); color: var(--dfm-amber-ink); }
.dfm-tool__panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.35s var(--dfm-ease), visibility 0s 0.35s; }
.dfm-tool__check.is-open > .dfm-tool__panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.35s var(--dfm-ease), visibility 0s; }
.dfm-tool__panel-in { min-height: 0; overflow: hidden; }
.dfm-tool__panel-pad { padding: 0 0.875rem 0.875rem; }
.dfm-tool__inst { position: relative; max-height: 260px; overflow-y: auto; margin: 0 -0.125rem; padding: 0.5rem 0.125rem 0.125rem; border-top: 1px solid var(--color-border); overscroll-behavior: contain; }
.dfm-tool__inst li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.625rem; padding: 0.25rem 0.375rem; border-radius: var(--radius-md); transition: background 0.2s; }
.dfm-tool__inst li:hover,
.dfm-tool__inst li.is-hot { background: var(--dfm-amber-bg); }
.dfm-tool__n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--dfm-amber); color: #fff; font-family: var(--font-heading); font-size: 0.6875rem; font-weight: 700; }
.dfm-tool__inst-t { min-width: 0; font-size: 0.875rem; line-height: 1.3; color: var(--color-text); }
.dfm-tool__inst-t strong { font-family: var(--font-heading); color: var(--color-secondary); }
.dfm-tool__inst-t span { display: block; font-size: 0.8125rem; color: var(--color-text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfm-tool__loc { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.25rem; padding: 0 0.625rem; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--color-primary); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-full); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.dfm-tool__loc svg { width: 14px; height: 14px; }
.dfm-tool__loc:hover { background: #eff6ff; border-color: var(--color-primary); }
.dfm-tool__loc:disabled { color: var(--color-text-lighter); background: none; border-color: transparent; cursor: default; }
@media (max-width: 760px) { .dfm-tool__loc { min-height: 2.75rem; } .dfm-tool__check-btn { padding: 0.5rem 0.75rem; } }
.dfm-tool__advice { margin-top: 0.625rem; padding: 0.625rem 0.75rem; border-left: 3px solid var(--dfm-amber); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--dfm-amber-bg); font-size: 0.8125rem; line-height: 1.45; color: var(--color-text); }
.dfm-tool__advice b { display: block; margin-bottom: 0.125rem; font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dfm-amber-ink); }
.dfm-tool__notes { margin-top: 0.5rem; border-style: dashed; border-color: var(--dfm-line); background: transparent; }
.dfm-tool__notes .dfm-tool__check-btn { min-height: 2.875rem; }
.dfm-tool__notes .dfm-tool__ico { width: 22px; height: 22px; color: var(--dfm-info); }
.dfm-tool__notes .dfm-tool__ico svg { opacity: 1; transform: none; }
.dfm-tool__notes .dfm-tool__check-name { font-weight: 600; font-size: 0.9375rem; color: var(--dfm-info); }
.dfm-tool__notes.is-open { border-style: solid; border-color: var(--dfm-line); box-shadow: none; }
.dfm-tool__notes.is-open .dfm-tool__chev { color: var(--dfm-info); }
.dfm-tool__notelist { display: grid; gap: 0.5rem; padding: 0.625rem 0.875rem 0.875rem; border-top: 1px solid var(--color-border); }
.dfm-tool__notelist strong { font-family: var(--font-heading); font-size: 0.875rem; color: var(--color-secondary); }
.dfm-tool__notelist span { display: block; font-size: 0.8125rem; line-height: 1.4; color: var(--color-text-light); }

/* ---------------------------------------------------------------- picker, footer, confirm */
.dfm-tool__picker { margin: 1.25rem 0 0; padding: 0.25rem 1rem 1rem; background: var(--color-background-alt); border: 1px solid var(--color-border); border-radius: var(--radius-lg); max-width: 520px; }
.dfm-tool__picker .dfm-tool__h3 { margin-top: 0.75rem; }
.dfm-tool__picker .dfm-tool__help + .dfm-tool__field { margin-top: 1rem; }
.dfm-tool__picker .dfm-tool__field:last-of-type { margin-bottom: 0.75rem; }
.dfm-tool__picker .dfm-tool__select { margin-top: 0; }
.dfm-tool__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border); }
.dfm-tool__foot-links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.dfm-tool__work[data-mode="progress"] .dfm-tool__foot-links { visibility: hidden; } /* keeps its place: the footer is the same height all the way through */
.dfm-tool__foot-note { max-width: 560px; font-size: 0.8125rem; color: var(--color-text-light); }
@media (max-width: 760px) { .dfm-tool__foot { flex-direction: column; align-items: flex-start; } }
.dfm-tool__foot-links { min-height: 2.75rem; }
@media (max-width: 760px) { .dfm-tool__foot-links { min-height: 5.5rem; } } /* the three links take two rows on a phone */
.dfm-tool__confirm { margin-top: 0.5rem; padding: 0.875rem 1rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-md); }
.dfm-tool__confirm p { font-size: 0.9375rem; }
.dfm-tool__confirm .dfm-tool__actions { margin-bottom: 0; }
.dfm-tool__resend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0.5rem 0 1rem; }
.dfm-tool__resend .dfm-tool__help { margin: 0; }

/* ---------------------------------------------------------------- mobile summary bar */
.dfm-tool__sticky { display: none; }
@media (max-width: 960px) {
  .dfm-tool__sticky {
    position: fixed;
    z-index: 1400;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
    background: rgb(255 255 255 / 0.97);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.1);
    transform: translateY(150%);
    visibility: hidden;
    transition: transform 0.4s var(--dfm-ease), visibility 0s 0.4s;
  }
  .dfm-tool__sticky.is-on { transform: none; visibility: visible; transition: transform 0.4s var(--dfm-ease); }
  .dfm-tool__sticky-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--dfm-amber-bg); color: var(--dfm-amber-ink); }
  .dfm-tool__sticky[data-verdict="passed"] .dfm-tool__sticky-ico { background: var(--dfm-ok-bg); color: var(--dfm-ok); }
  .dfm-tool__sticky-ico svg { width: 20px; height: 20px; }
  .dfm-tool__sticky-t { flex: 1; min-width: 0; font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 700; line-height: 1.2; color: var(--color-secondary); }
  .dfm-tool__sticky .dfm-tool__btn { min-height: 2.75rem; padding: 0.5rem 0.875rem; font-size: 0.875rem; }
  .dfm-tool__head { grid-template-columns: auto minmax(0, 1fr); }
  .dfm-tool__head-prog,
  .dfm-tool__head-act { grid-column: 1 / -1; max-width: none; margin-top: 0.875rem; }
  .dfm-tool__head-act .dfm-tool__btn { flex: 1 1 calc(50% - 0.25rem); min-height: 2.75rem; padding: 0.5rem 0.75rem; font-size: 0.9375rem; white-space: normal; }
  .dfm-tool__head-act .dfm-tool__btn--primary { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .dfm-tool__vicon { width: 44px; height: 44px; }
  .dfm-tool__vicon svg { width: 22px; height: 22px; }
}

/* ---------------------------------------------------------------- error and quote stages */
.dfm-tool__verdict { display: flex; align-items: flex-start; gap: 0.875rem; padding: 1rem; border: 2px solid var(--dfm-ok-line); border-radius: var(--radius-lg); background: var(--dfm-ok-bg); color: var(--dfm-ok); }
.dfm-tool__verdict-icon { flex: none; display: inline-flex; padding-top: 0.125rem; }
.dfm-tool__verdict-text { min-width: 0; }
.dfm-tool__verdict-title { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 700; line-height: 1.2; color: inherit; }
.dfm-tool__verdict-sub { margin-top: 0.125rem; font-size: 0.9375rem; font-weight: 500; color: var(--color-text); }

/* The quote steps that follow each other without a click (processing, then the result) take the same height. */
.dfm-tool [data-quote-step="processing"],
.dfm-tool [data-quote-step="done"],
.dfm-tool [data-quote-step="message"] { min-height: 13rem; }

/* ---------------------------------------------------------------- confetti */
.dfm-tool__confetti { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }

@media (prefers-reduced-motion: reduce) {
  .dfm-tool *,
  .dfm-tool *::before,
  .dfm-tool *::after { transition: none !important; animation: none !important; }
  .dfm-tool__bar.is-indeterminate .dfm-tool__bar-fill { width: 100%; inset: 0; opacity: 0.45; }
  .dfm-tool__marker-dot::after { display: none; }
  .dfm-tool__check[data-state="run"] { background: #f3f8ff; }
  .i-ok .tick { stroke-dashoffset: 0; }
}
