/*
 * TrazaLab shared visual system
 * Clinical-premium foundation: quiet surfaces, precise hierarchy, one accent.
 * Component rules are deliberately scoped to avoid broad page regressions.
 */
:root {
  --tl-ink: #17212b;
  --tl-graphite: #50606d;
  --tl-muted: #71808c;
  --tl-line: #dfe5e7;
  --tl-line-strong: #cbd4d7;
  --tl-paper: #f7f8f6;
  --tl-surface: #ffffff;
  --tl-surface-muted: #f1f4f2;
  --tl-teal: #287d75;
  --tl-teal-dark: #1f665f;
  --tl-danger: #a94843;
  --tl-radius-sm: 7px;
  --tl-radius-md: 12px;
  --tl-shadow-menu: 0 16px 38px rgba(23, 33, 43, .11);
  --tl-content: 1200px;
  --tl-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Shared controls */
.tl-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--tl-radius-sm);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.tl-button--primary {
  color: #fff;
  background: var(--tl-teal);
  border-color: var(--tl-teal);
}

.tl-button--primary:hover {
  color: #fff;
  background: var(--tl-teal-dark);
  border-color: var(--tl-teal-dark);
}

.tl-button--secondary {
  color: var(--tl-ink);
  background: var(--tl-surface);
  border-color: var(--tl-line-strong);
}

.tl-button--secondary:hover {
  color: var(--tl-ink);
  background: var(--tl-surface-muted);
  border-color: #b8c4c8;
}

.tl-button:focus-visible,
#mainNav a:focus-visible,
#mainNav button:focus-visible,
.ft a:focus-visible,
.ft button:focus-visible {
  outline: 3px solid rgba(40, 125, 117, .22);
  outline-offset: 3px;
}

/* Master navigation: crisp, calm, and compact */
#mainNav {
  background: rgba(255, 255, 255, .985) !important;
  border-bottom: 1px solid var(--tl-line) !important;
}

#mainNav.scrolled {
  box-shadow: 0 8px 22px rgba(23, 33, 43, .055) !important;
}

#mainNav .container {
  max-width: 1280px;
}

#mainNav .logo img {
  height: 39px;
}

#mainNav .mt,
#mainNav .nav-left a:not([style]),
#mainNav .nav-right a:not([style]) {
  color: #34434f;
  font-size: .855rem;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--tl-radius-sm);
}

#mainNav .mt:hover,
#mainNav .nav-left a:not([style]):hover,
#mainNav .nav-right a:not([style]):hover {
  color: var(--tl-ink);
  background: var(--tl-surface-muted) !important;
}

#mainNav .nav-right > a[rel="nofollow"] {
  min-height: 40px !important;
  padding: 0 17px !important;
  color: #34434f !important;
  background: #fff !important;
  border: 1px solid var(--tl-line-strong) !important;
  border-radius: var(--tl-radius-sm) !important;
}

#mainNav .nav-right > a[rel="nofollow"]:hover {
  color: var(--tl-ink) !important;
  background: var(--tl-surface-muted) !important;
  border-color: #b8c4c8 !important;
}

#mainNav .cta-pill {
  min-height: 40px !important;
  padding: 0 19px !important;
  border-radius: var(--tl-radius-sm) !important;
  background: var(--tl-teal) !important;
  box-shadow: none !important;
}

#mainNav .cta-pill:hover {
  background: var(--tl-teal-dark) !important;
}

#mainNav .mp {
  background: #fff !important;
  border: 1px solid var(--tl-line) !important;
  border-radius: var(--tl-radius-md) !important;
  box-shadow: var(--tl-shadow-menu) !important;
}

#mainNav .mi:hover {
  background: var(--tl-surface-muted) !important;
}

/* Homepage hero: immediate clarity and a visible conversion path */
.tl-home {
  background: var(--tl-paper);
  color: var(--tl-ink);
}

.tl-home .hero {
  min-height: clamp(650px, 86svh, 780px) !important;
  padding: 128px 0 78px !important;
  background: var(--tl-paper) !important;
  border-bottom: 1px solid var(--tl-line);
}

.tl-home .hero::before,
.tl-home .hero::after {
  display: none !important;
}

.tl-home .hero-inner {
  width: min(1080px, calc(100vw - 80px)) !important;
  max-width: 1080px !important;
}

.tl-hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--tl-teal);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1;
  text-transform: uppercase;
}

.tl-hero-eyebrow::before,
.tl-hero-eyebrow::after {
  content: '';
  width: 34px;
  height: 1px;
  background: #a8c5c1;
}

.tl-home .hero-curse-fit {
  max-width: 1020px !important;
  margin: 0 auto 28px !important;
  color: var(--tl-ink) !important;
  font-size: clamp(3.2rem, 5.2vw, 4.65rem) !important;
  font-weight: 700 !important;
  line-height: 1.01 !important;
  letter-spacing: -.052em !important;
}

.tl-home .hero-curse .curse-word,
.tl-home .hero-tagline,
.tl-home .hero-actions {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.tl-home .hero-curse-fit .hero-money {
  color: var(--tl-ink) !important;
}

.tl-home .hero-curse-fit .curse-red {
  color: var(--tl-danger) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--tl-danger) !important;
}

.tl-home .hero-tagline-row {
  max-width: 780px !important;
  margin: 0 auto !important;
}

.tl-home .hero-tagline-row .hero-tagline {
  margin: 0 !important;
  color: var(--tl-graphite) !important;
  font-size: clamp(1.05rem, 1.55vw, 1.25rem) !important;
  line-height: 1.58 !important;
}

.tl-home .hero-tagline strong {
  color: var(--tl-ink) !important;
  font-weight: 650 !important;
}

.tl-home .tl-hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 0 !important;
}

.tl-hero-assurance {
  margin: 16px 0 0;
  color: var(--tl-muted);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .01em;
}

/* Master footer: clinical neutral rather than decorative */
.ft {
  background: #f1f3f1 !important;
  border-top: 1px solid var(--tl-line);
}

.ft-accent {
  height: 2px !important;
  background: var(--tl-teal) !important;
}

.ft-inner {
  max-width: 1160px !important;
}

.ft-brand {
  padding-top: 64px !important;
  padding-bottom: 52px !important;
}

.ft-logo {
  height: 38px !important;
  margin-bottom: 22px !important;
}

.ft-tagline {
  max-width: 520px !important;
  color: var(--tl-graphite) !important;
  font-size: 1.08rem !important;
  line-height: 1.55 !important;
}

.ft-tagline strong {
  color: var(--tl-ink) !important;
}

.ft-cta {
  padding: 14px 30px !important;
  color: #fff !important;
  background: var(--tl-teal) !important;
  border-radius: var(--tl-radius-sm) !important;
  box-shadow: none !important;
  font-size: .78rem !important;
  letter-spacing: .08em !important;
}

.ft-cta:hover {
  background: var(--tl-teal-dark) !important;
  box-shadow: none !important;
  transform: none !important;
}

.ft-divider,
.ft-contact::before {
  background: var(--tl-line-strong) !important;
}

.ft-acc-header {
  color: var(--tl-ink) !important;
}

.ft-acc-ico,
.ft-contact-item svg {
  color: var(--tl-teal) !important;
}

.ft-acc-links a,
.ft-contact-item {
  color: var(--tl-graphite) !important;
}

.ft-disclaimer,
.ft-copy,
.ft-legal a {
  color: var(--tl-muted) !important;
}

@media (max-width: 900px) {
  #mainNav .logo img {
    height: 37px;
  }

  #mobileMenu {
    background: #fff !important;
  }

  .tl-home .hero {
    min-height: auto !important;
    padding: 118px 0 72px !important;
  }

  .tl-home .hero-inner {
    width: min(100% - 40px, 680px) !important;
  }

  .tl-home .hero-curse-fit {
    font-size: clamp(2.35rem, 10.2vw, 3rem) !important;
    line-height: 1.03 !important;
    margin-bottom: 24px !important;
  }

  .tl-hero-eyebrow {
    margin-bottom: 20px;
    font-size: .64rem;
    letter-spacing: .13em;
  }

  .tl-hero-eyebrow::before,
  .tl-hero-eyebrow::after {
    width: 22px;
  }

  .tl-home .hero-tagline-row .hero-tagline {
    font-size: 1rem !important;
    line-height: 1.58 !important;
  }

  .tl-home .tl-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 26px !important;
  }

  .tl-home .tl-button {
    width: 100%;
    min-height: 50px;
  }

  .tl-hero-assurance {
    max-width: 300px;
    margin: 15px auto 0;
    line-height: 1.5;
  }

  .ft-brand {
    padding: 42px 22px 34px !important;
  }

  .ft-logo {
    height: 33px !important;
    margin-bottom: 17px !important;
  }

  .ft-tagline {
    max-width: 350px !important;
    font-size: .96rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-button,
  #mainNav *,
  .ft * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/*
 * Technical SEO/mobile rendering guard — 2026-07-27.
 * Critical copy must be present in the first rendered mobile frame. Several
 * legacy templates initialize reveal elements at opacity:0 and depend on an
 * IntersectionObserver/timeout to expose the H1. Avoid making indexable copy
 * contingent on JavaScript at mobile sizes.
 */
h1.rv,
h1.reveal,
.hero .rv,
.hero-p .rv,
.hero [data-reveal],
.hero-p [data-reveal] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  transition-delay: 0s !important;
}

@media (max-width: 768px) {
  .rv,
  .rv-l,
  .rv-r,
  .rv-left,
  .rv-right,
  .rv-scale,
  .reveal,
  [data-reveal] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition-delay: 0s !important;
  }

  /* Contain legacy wide tables without creating page-level horizontal scroll. */
  table,
  .mat-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* The fixed tool deck previously extended 10px beyond the viewport. */
  .tl-tool-deck {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
  }
}
