/* Shared service detail pages: readable content, native images and table scrolling. */
.service-detail-page .reading-grid { grid-template-columns: minmax(0, 1fr) 288px; gap: 40px; }
.service-detail-page .rich-content { max-width: 72ch; font-size: 16px; line-height: 1.8; color: var(--ui-ink); overflow-wrap: anywhere; }
.service-detail__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 16px; color: var(--ui-accent); font-size: 14px; font-weight: 600; }
.service-detail__back > .icon { transform: rotate(180deg); }
.service-detail__back:hover { text-decoration: underline; text-underline-offset: .2em; }
.service-detail-page .service-detail__table { max-width: 100%; overflow-x: auto; margin: 28px 0 32px; border: 1px solid var(--ui-border); border-radius: 12px; }
.service-detail-page .rich-content table { display: table; width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 14px; }
.service-detail-page .rich-content caption { padding: 20px 16px; text-align: left; color: var(--ui-ink); font-size: 18px; font-weight: 650; line-height: 1.45; }
.service-detail-page .rich-content :is(th, td) { padding: 12px 14px; color: var(--ui-ink); font-size: 14px; line-height: 1.6; text-align: left; vertical-align: top; border: 1px solid var(--ui-border); }
.service-detail-page .rich-content th { background: var(--ui-surface); font-weight: 600; }
.service-detail-page .rich-content td { background: var(--white); }
.service-detail-page .service-detail__gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; }
.service-detail-page .rich-content .service-detail__gallery figure { margin: 0; min-width: 0; }
.service-detail-page .service-detail__gallery a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--ui-surface); cursor: zoom-in; }
/* Override legacy CMS auto-height only within thumbnail frames. */
.service-detail-page .rich-content .service-detail__gallery img { position: absolute; inset: 0; display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: center; margin: 0; box-shadow: none; }
.service-detail-page .rich-content .service-detail__gallery img[hidden] { display: none; }
.service-detail-page .service-detail__gallery .service-detail__image-fallback { position: absolute; inset: 0; min-height: 0; height: 100%; padding: 12px; text-align: center; }
.service-detail-page .sidebar-links a, .service-detail-page .sidebar-contact p { font-size: 14px; }
.service-detail-page .article-share { flex-wrap: wrap; gap: 12px; margin-top: 32px; color: var(--ui-muted); font-size: 14px; }
.service-detail-page .share-actions { flex-wrap: wrap; }
.service-detail-page .share-actions > :is(a, button) { min-height: 44px; font-size: 13px; }
.service-detail-page a:focus-visible,
.service-detail-page button:focus-visible,
.service-detail-page .service-detail__table:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 4px; }
.service-detail-page + .related-section { padding-block: 40px; }
.service-detail-page + .related-section .article-meta { color: var(--ui-muted); font-size: 12px; flex-wrap: wrap; }
.service-detail-page + .related-section .article-card-body > p { color: var(--ui-muted); font-size: 14px; line-height: 1.7; }
.service-detail-page + .related-section .text-link { min-height: 44px; font-size: 14px; }
@media (max-width: 980px) {
    .service-detail-page .reading-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 620px) {
    .service-detail-page .service-detail__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .service-detail-page .rich-content :is(th, td) { padding: 10px; }
    .service-detail-page .rich-content table { min-width: 520px; }
    .service-detail-page .rich-content caption { font-size: 17px; padding: 16px; }
}

.service-detail-page .rich-content li { margin-block: 8px; }
.service-detail-page .rich-content a:not(:has(img)) { text-decoration: underline; text-underline-offset: .2em; }
.service-detail-page .rich-content img { height: auto; box-shadow: none; }
.service-detail-page .service-detail__image-fallback { min-height: 180px; height: auto; border-radius: 12px; font-size: 14px; }
