/* Free Tools — calculator UI matching Total Tradesmen design system */

.tools-hub-page .legal-doc-hero__lead,
.tool-page .legal-doc-hero__lead {
  max-width: min(42rem, 100%);
}

.tools-hub-page .legal-doc-hero .section-heading,
.tool-page .legal-doc-hero .section-heading {
  text-transform: none;
}

/* Breadcrumbs — single baseline, white on blue hero */
.tools-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0 0 1rem;
  padding: 0;
  padding-left: 0 !important;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.25;
  color: rgb(255 255 255 / 0.85);
}

.tools-breadcrumbs li,
.tools-hub-page .tools-breadcrumbs li,
.tool-page .tools-breadcrumbs li,
.legal-doc-page .tools-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0;
  list-style: none;
  line-height: 1.25;
}

.tools-breadcrumbs li + li,
.legal-doc-page .tools-breadcrumbs li + li {
  margin-top: 0 !important;
}

.tools-breadcrumbs li::marker {
  content: none;
  display: none;
}

.tools-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 0.5rem;
  color: rgb(255 255 255 / 0.45);
  font-weight: 400;
  speak: never;
}

.tools-breadcrumbs a,
.tools-hub-page .tools-breadcrumbs a,
.tool-page .tools-breadcrumbs a,
.legal-doc-page .tools-breadcrumbs a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.25;
}

.tools-breadcrumbs a:hover,
.tools-breadcrumbs a:focus-visible,
.legal-doc-page .tools-breadcrumbs a:hover,
.legal-doc-page .tools-breadcrumbs a:focus-visible {
  color: #fff !important;
  text-decoration: underline;
  outline: none;
}

.tools-breadcrumbs [aria-current="page"] {
  color: rgb(255 255 255 / 0.8);
  font-weight: 500;
  line-height: 1.25;
}

/* Hero CTAs on blue legal-doc-hero */
.tool-page .legal-doc-hero .tool-hero-actions,
.tools-hub-page .legal-doc-hero .tool-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}

.tool-page .legal-doc-hero .hero-home-cta-trial,
.tool-page .legal-doc-hero .hero-home-cta-pricing,
.tools-hub-page .legal-doc-hero .hero-home-cta-trial,
.tools-hub-page .legal-doc-hero .hero-home-cta-pricing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  font-weight: 600;
  text-decoration: none;
}

.tool-page .legal-doc-hero .hero-home-cta-trial,
.tools-hub-page .legal-doc-hero .hero-home-cta-trial {
  border: 2px solid transparent;
  background-color: #fff;
  color: #093de4;
}

.tool-page .legal-doc-hero .hero-home-cta-trial:hover,
.tools-hub-page .legal-doc-hero .hero-home-cta-trial:hover {
  background-color: rgb(255 255 255 / 0.92);
  color: #093de4;
}

.tool-page .legal-doc-hero .hero-home-cta-pricing,
.tools-hub-page .legal-doc-hero .hero-home-cta-pricing {
  border: 2px solid rgb(255 255 255 / 0.72);
  color: #fff;
  background: transparent;
}

.tool-page .legal-doc-hero .hero-home-cta-pricing:hover,
.tools-hub-page .legal-doc-hero .hero-home-cta-pricing:hover {
  background-color: rgb(255 255 255 / 0.1);
  color: #fff;
}

.tools-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.tools-category-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1.5px solid rgb(255 255 255 / 0.55);
  background: transparent;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.tools-category-nav a:hover,
.tools-category-nav a:focus-visible {
  background: rgb(255 255 255 / 0.12);
  border-color: #fff;
  color: #fff;
  outline: none;
}

.tools-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .tools-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tools-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tools-hub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.25rem 1.15rem;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(6 18 62 / 0.06);
  border: 1px solid rgb(0 0 0 / 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tools-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 14px 28px rgba(6, 18, 63, 0.1);
}

.tools-hub-card__title {
  margin: 0 !important;
  margin-top: 0 !important;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgb(6 18 62);
}

.tools-hub-card__desc {
  margin: 0.5rem 0 0;
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgb(0 0 0 / 0.55);
}

.tools-hub-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #093de4;
  text-decoration: none;
}

.tools-hub-card__cta:hover {
  color: #0837cb;
}

.tools-hub-card__cta svg {
  width: 1rem;
  height: 1rem;
}

.tools-hub-page .legal-doc-inner > h2.tools-category-heading {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid rgb(0 0 0 / 0.07);
}

.tools-hub-page .legal-doc-inner > h2.tools-category-heading:first-of-type {
  margin-top: 1.75rem;
  padding-top: 0;
  border-top: 0;
}

.tools-hub-page .legal-doc-inner > p {
  display: block;
  margin: 0.75rem 0 0;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgb(0 0 0 / 0.62);
}

.tools-hub-page .tools-hub-intro-heading {
  margin-top: 0 !important;
  margin-bottom: 0.65rem;
  padding-top: 0 !important;
  border-top: 0 !important;
  color: rgb(6 18 62);
}

.tools-hub-page .legal-doc-inner > h2:not(.tools-category-heading),
.tools-hub-page .tools-hub-outro-heading {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid rgb(0 0 0 / 0.07);
  color: rgb(6 18 62);
}

.tools-hub-page .legal-doc-inner > h2:not(.tools-category-heading) + p,
.tools-hub-page .tools-hub-outro {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 0.85rem !important;
  max-width: 42rem;
  font-size: 0.9375rem !important;
  line-height: 1.65 !important;
  color: rgb(0 0 0 / 0.62) !important;
}

.tools-hub-page .tools-hub-grid {
  margin-top: 0;
}

.tools-hub-page .fp-cta-strip .fp-cta-strip__sub,
.tool-page .fp-cta-strip .fp-cta-strip__sub {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0.85rem 0 2rem !important;
  color: rgb(255 255 255 / 0.92) !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

.tool-page .tt-calc {
  margin-top: 1.5rem;
}

.tool-page #calculator .legal-doc-inner > p {
  margin-bottom: 0;
}

.tool-page .faq-section .max-w-xl {
  max-width: none;
}

.tool-page .faq-section > .mx-auto > .faq-section__inner > .flex > p {
  max-width: none;
  white-space: normal;
}

/* —— Calculator layout —— */

.tt-calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0.5rem 0 0;
}

@media (min-width: 900px) {
  .tt-calc-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
    align-items: start;
  }
}

.tt-calc-card,
.tt-calc-results {
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgb(0 0 0 / 0.08);
  box-shadow: 0 12px 28px rgba(6, 18, 63, 0.08);
}

.tt-calc-card {
  padding: 1.35rem 1.25rem 1.4rem;
}

@media (min-width: 640px) {
  .tt-calc-card {
    padding: 1.6rem 1.5rem 1.65rem;
  }
}

.tt-calc-card__title,
.tt-calc-results__title {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgb(6 18 62);
}

.tt-calc-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tt-calc-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

@media (min-width: 560px) {
  .tt-calc-fields--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tt-calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tt-calc-field--full {
  grid-column: 1 / -1;
}

.tt-calc-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.65);
}

.tt-calc-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgb(0 0 0 / 0.42);
}

.tt-calc-input,
.tt-calc-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #061240;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.625rem;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.tt-calc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23061240' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
}

.tt-calc-input:hover,
.tt-calc-select:hover {
  border-color: rgba(0, 0, 0, 0.25);
}

.tt-calc-input:focus,
.tt-calc-select:focus {
  border-color: #093de4;
  box-shadow: 0 0 0 3px rgba(9, 61, 228, 0.1);
}

.tt-calc-field--error .tt-calc-input,
.tt-calc-field--error .tt-calc-select {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.tt-calc-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #061240;
  cursor: pointer;
}

.tt-calc-checkbox input {
  margin-top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: #093de4;
  cursor: pointer;
}

.tt-calc-checkbox input:focus-visible {
  outline: 2px solid #093de4;
  outline-offset: 2px;
}

.tt-calc-error {
  margin: 0;
  font-size: 0.75rem;
  color: #dc2626;
}

.tt-calc-error-summary {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  background: rgb(220 38 38 / 0.06);
  border: 1px solid rgb(220 38 38 / 0.2);
  color: #b91c1c;
  font-size: 0.875rem;
}

.tt-calc-segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 0.75rem;
  background: rgb(0 0 0 / 0.04);
}

.tt-calc-segmented__option {
  position: relative;
}

.tt-calc-segmented__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.tt-calc-segmented__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(0 0 0 / 0.55);
  background: transparent;
  text-align: center;
  transition:
    background-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.tt-calc-segmented__option input:checked + span {
  background: #fff;
  color: #061240;
  box-shadow: 0 1px 3px rgb(6 18 62 / 0.12);
}

.tt-calc-segmented__option input:focus-visible + span {
  outline: 2px solid #093de4;
  outline-offset: 2px;
}

.tt-calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.tt-calc-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #093de4;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tt-calc-submit:hover {
  background: #0837cb;
}

.tt-calc-submit:focus-visible {
  outline: 2px solid #093de4;
  outline-offset: 2px;
}

.tt-calc-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 0.625rem;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #061240;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background-color 0.15s;
}

.tt-calc-reset:hover {
  border-color: rgba(0, 0, 0, 0.28);
  background: rgb(0 0 0 / 0.02);
}

.tt-calc-reset:focus-visible {
  outline: 2px solid #093de4;
  outline-offset: 2px;
}

/* Results */

.tt-calc-results {
  padding: 1.35rem 1.25rem 1.4rem;
  position: sticky;
  top: 5.5rem;
}

@media (min-width: 640px) {
  .tt-calc-results {
    padding: 1.6rem 1.5rem 1.65rem;
  }
}

.tt-calc-results__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.tt-calc-results__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgb(0 0 0 / 0.07);
}

.tt-calc-results__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tt-calc-results__row:first-child {
  padding-top: 0;
}

.tt-calc-results__label {
  font-size: 0.875rem;
  color: rgb(0 0 0 / 0.55);
}

.tt-calc-results__value {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgb(6 18 62);
  font-variant-numeric: tabular-nums;
}

.tt-calc-results__row--primary {
  margin-top: 0;
  padding: 0.85rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tt-calc-results__row--primary .tt-calc-results__label {
  color: #061240;
  font-weight: 600;
}

.tt-calc-results__row--primary .tt-calc-results__value {
  font-size: 1.25rem;
  color: #093de4;
}

.tt-calc-results--loading {
  opacity: 0.72;
}

.tt-calc-results__note {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgb(0 0 0 / 0.42);
}

.tt-calc-results__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tt-calc-results__copy .tt-calc-copy {
  padding: 0.55rem 0.95rem;
  font-size: 0.8125rem;
}

.tt-calc-results__copy-status {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #093de4;
}

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

/* Explanation + related tools */

.tool-explain {
  margin-top: 0.35rem;
}

.tool-explain p {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgb(0 0 0 / 0.58);
}

.tool-explain h3 {
  margin-top: 1.35rem;
}

.tool-explain__formula {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.tool-explain__formula-heading {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #061240;
}

.tool-explain__formula-heading + .tool-explain__formula {
  margin-top: 0.25rem;
}

.tool-explain__formula li {
  margin: 0;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgb(6 18 62);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid rgb(0 0 0 / 0.06);
}

.tool-explain__formula li:last-child {
  border-bottom: 0;
}

.legal-doc-page .tool-explain__formula li + li {
  margin-top: 0;
}

.tool-related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .tool-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tool-related a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(0 0 0 / 0.08);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.tool-related a:hover {
  border-color: rgb(9 61 228 / 0.35);
}

.tool-related__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 650;
  color: #061240;
}

.tool-related__desc {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(0 0 0 / 0.5);
}

.tool-page .faq-section {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  margin-bottom: clamp(4rem, 6.5vw, 5.5rem);
}

.tool-page .fp-cta-strip {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tools-hub-card,
  .tt-calc-submit,
  .tt-calc-input,
  .tt-calc-select {
    transition: none;
  }

  .tools-hub-card:hover {
    transform: none;
  }
}
