.service-card h3 {
  min-height: 3.9rem;
  line-height: 1.25;
}

.service-card .service-summary {
  margin-bottom: 1.4rem;
}

.service-card-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: auto;
}

.service-card-actions > a,
.service-card-actions > button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  margin-top: 0 !important;
  padding: 0.35rem 0;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  background-image: none !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 180ms ease;
}

.service-card-actions > a {
  color: var(--ink);
  font-weight: 800;
}

.service-details-trigger {
  align-self: auto;
  color: var(--maroon);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 740;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.service-details-trigger::after {
  content: "→";
  margin-left: 0.4rem;
}

.service-card-actions > a:hover,
.service-card-actions > a:focus-visible,
.service-details-trigger:hover,
.service-details-trigger:focus-visible {
  color: var(--maroon-deep);
  text-decoration: underline !important;
  text-decoration-color: rgba(77, 32, 29, 0.52) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 6px !important;
}

.service-card-actions > a:focus-visible,
.service-details-trigger:focus-visible,
.service-dialog-close:focus-visible,
.service-dialog-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.service-details-dialog {
  width: min(760px, calc(100% - 36px));
  max-height: min(84vh, 780px);
  padding: 0;
  border: 1px solid rgba(185, 133, 60, 0.34);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(46, 20, 19, 0.28);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.service-details-dialog::backdrop {
  background: rgba(30, 23, 20, 0.58);
  backdrop-filter: blur(3px);
}

.service-dialog-shell {
  position: relative;
  padding: 3rem 3.2rem 3.2rem;
}

.service-dialog-close {
  position: absolute;
  top: 1.15rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--maroon);
  font-family: var(--sans);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.service-dialog-eyebrow {
  margin: 0 0 0.9rem;
  color: var(--maroon);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.service-details-dialog h2 {
  max-width: 620px;
  margin: 0 3rem 1.7rem 0;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
}

.service-dialog-copy {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.service-dialog-copy p {
  margin: 0;
}

.service-dialog-copy p + p {
  margin-top: 1.15rem;
}

.service-dialog-copy .service-dialog-conclusion {
  margin-top: 1.55rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(185, 133, 60, 0.34);
  color: var(--maroon);
  font-weight: 700;
  line-height: 1.65;
}

.service-dialog-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-top: 2rem;
  padding-bottom: 0.24rem;
  border-bottom: 1px solid rgba(77, 32, 29, 0.34);
  color: var(--maroon);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

@media (max-width: 640px) {
  .service-card h3 {
    min-height: 0;
    line-height: inherit;
  }

  .service-card .service-summary {
    margin-bottom: 1.15rem;
  }

  .service-card-actions {
    flex-wrap: nowrap;
    gap: 1.5rem;
  }

  .service-card-actions > a,
  .service-card-actions > button {
    min-height: 44px;
  }

  .service-details-dialog {
    width: calc(100% - 22px);
    max-height: 88vh;
  }

  .service-dialog-shell {
    padding: 2.45rem 1.35rem 2rem;
  }

  .service-dialog-close {
    top: 0.8rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
  }

  .service-dialog-eyebrow {
    margin-bottom: 0.7rem;
  }

  .service-details-dialog h2 {
    margin-right: 2.5rem;
    margin-bottom: 1.35rem;
    font-size: clamp(1.8rem, 9vw, 2.45rem);
  }

  .service-dialog-copy {
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .service-dialog-copy .service-dialog-conclusion {
    margin-top: 1.35rem;
    padding-top: 0.9rem;
  }

  .service-dialog-cta {
    margin-top: 1.65rem;
  }
}
