/* Shared reading and component quality, retaining each template's brand and hero. */
body:not(.tpl-general_ai) {
  --quality-line: #dfe7ef;
  --quality-ink: #203449;
  --quality-muted: #526579;
}
body:not(.tpl-general_ai) .section-title { letter-spacing: -.02em; line-height: 1.4; }
body:not(.tpl-general_ai) :is(.section-sub, .card-desc, .excerpt) { line-height: 1.85; }
body:not(.tpl-general_ai) :is(.card, .article-item, .news-item, .honor-card, .custom-record) {
  border: 1px solid var(--quality-line);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(24,48,78,.045);
  overflow: hidden;
  min-width: 0;
}
body:not(.tpl-general_ai) :is(a.card, a.article-item, a.news-item):hover {
  border-color: #b6cbe1;
  box-shadow: 0 12px 28px rgba(24,48,78,.09);
  transform: translateY(-2px);
}
body:not(.tpl-general_ai) .card-body { padding: 22px 24px; }
body:not(.tpl-general_ai) :is(.card, .custom-record) :is(h2,h3) { line-height: 1.5; overflow-wrap: anywhere; }
body:not(.tpl-general_ai) :is(.card p, .card-desc, .excerpt) { color: var(--quality-muted); }
body:not(.tpl-general_ai) :is(.page-header, .page-hero, .compact-hero) h1 { font-size: clamp(28px,3vw,42px); line-height: 1.35; overflow-wrap: anywhere; }
body:not(.tpl-general_ai) :is(.prose, .article-content, .record-content) { line-height: 1.9; overflow-wrap: anywhere; }
body:not(.tpl-general_ai) :is(.prose, .article-content, .record-content) img { max-width: 100%; height: auto; border-radius: 10px; }
body:not(.tpl-general_ai) :is(.prose, .article-content, .record-content) table { display: block; max-width: 100%; overflow-x: auto; }
body:not(.tpl-general_ai) :is(.prose, .article-content, .record-content) pre { max-width: 100%; overflow-x: auto; }
body:not(.tpl-general_ai) :is(.pd-info, .case-main, .service-main, .article-main, .contact-info) { min-width: 0; }
body:not(.tpl-general_ai) .side-card { padding: 24px; border: 1px solid var(--quality-line); border-radius: 14px; }
body:not(.tpl-general_ai) .empty-state { padding: 40px 24px; border: 1px solid var(--quality-line); border-radius: 14px; background: #f7f9fb; color: var(--quality-muted); }
/* Product photography must retain the complete object; project imagery keeps its crop. */
body:not(.tpl-general_ai) .product-card .card-img { background: #f5f8fb; }
body:not(.tpl-general_ai) .product-card .card-img img { object-fit: contain; padding: 16px; }
/* Reset figure's browser margins: otherwise each grid cell loses 80px of image. */
body .gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: auto; gap: 18px; }
body .gallery-item { margin: 0; aspect-ratio: 4/3; min-width: 0; }
body .gallery-item:nth-child(5n+1) { grid-row: auto; }
body .gallery-item img { display: block; }
body .gallery-item:has(figcaption)::after { opacity: 1; }
body .gallery-item figcaption { opacity: 1; transform: none; }
body .team-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 24px; }
body .image-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; min-height: 160px; padding: 24px; background: #f1f5f9; color: #334b63; text-align: center; overflow-wrap: anywhere; }
body .image-fallback strong { font-size: 16px; line-height: 1.6; }
body .image-fallback span { color: #61758a; font-size: 13px; }
body:not(.tpl-general_ai) .site-footer h3 { color: #fff; }
body:not(.tpl-general_ai) .site-footer :is(p,li,a) { color: #d4dfeb; }
/* The generic image-link rule previously stretched the date badge over the cover. */
.tpl-manufacture .mfr-post-card .mfr-post-image a.mfr-post-date { width: auto; height: auto; }
.tpl-manufacture .mfr-blog-bg .more-link a { color: #16263a; }
.tpl-manufacture .mfr-promo-banner figure { margin: 0; }
.tpl-manufacture .mfr-promo-banner img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; }
body.tpl-service .home-intro h2 { font-size: clamp(26px,2.5vw,36px); line-height: 1.5; }
body.tpl-service .home-intro-positioning { color: #526579; font-size: 16px; line-height: 1.85; font-weight: 400; }
body.tpl-service .home-intro-image { display: block; width: 100%; max-height: 300px; object-fit: contain; margin-top: 24px; border: 1px solid #dfe7ef; border-radius: 14px; background: #f5f8fb; }
body.tpl-service .home-company-facts { margin: 24px 0; }
body.tpl-service .home-company-facts > div { display: flex; gap: 20px; padding: 12px 0; border-top: 1px solid #dfe7ef; }
body.tpl-service .home-company-facts dt { color: #526579; flex: 0 0 80px; }
body.tpl-service .home-company-facts dd { margin: 0; color: #203449; overflow-wrap: anywhere; }
.tpl-manufacture .mfr-newsletter .mfr-nl-content h2 { font-size: clamp(26px,2.5vw,36px); line-height: 1.5; }
body.tpl-service .cta-band h2 { font-size: clamp(26px,2.5vw,36px); line-height: 1.4; text-wrap: balance; }
body.tpl-local .svc-hero-stats .stat strong { color: #17352b; }
body.tpl-local .svc-hero-stats .stat span { color: #405d52; }
body.tpl-local .svc-hero-kicker { color: #85591f; }
body:not(.tpl-general_ai) :is(.contact-list-large .value, .info-grid dd, .site-footer a) { overflow-wrap: anywhere; }
body :is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #80aaf0; outline-offset: 3px; }
body :is(section[id], .faq-group) { scroll-margin-top: 110px; }
@media(max-width:800px) {
  body:not(.tpl-general_ai) :is(.case-detail-layout,.service-detail) { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; }
}
@media(max-width:640px) {
  body .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body:not(.tpl-general_ai) .site-main > .section { padding-top: 40px; padding-bottom: 40px; }
  body:not(.tpl-general_ai) :is(.card-body,.side-card) { padding: 20px; }
  body:not(.tpl-general_ai) .card :is(h2,h3) { font-size: 18px; }
  body:not(.tpl-general_ai) .section-title { font-size: 26px; }
  body:not(.tpl-general_ai) :is(.contact-list-large li,.info-grid) { overflow-wrap: anywhere; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
