/* V2.2.1: make the public content hierarchy visible on every viewport. */
.detail-breadcrumb-label {
  color: var(--ink);
  font-weight: 700;
}

.product-system-links {
  margin: 10px 18px 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.product-system-links header {
  margin-bottom: 16px;
}

.product-system-links header > span {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.product-system-links h2 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 22px;
}

.product-system-links header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.product-system-links > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-system-links > div > a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.product-system-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff0f0;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.product-system-links strong,
.product-system-links small {
  display: block;
}

.product-system-links strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-system-links small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-system-links i {
  color: var(--muted);
  font-size: 18px;
  font-style: normal;
  text-align: right;
}

.smart-relation {
  margin: 10px 18px 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.smart-relation header {
  margin-bottom: 16px;
}

.smart-relation header > span {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.smart-relation h2 {
  margin: 5px 0 6px;
  color: var(--ink);
  font-size: 22px;
}

.smart-relation header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.smart-relation header > a {
  float: right;
  margin-top: -23px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.smart-system-link,
.smart-relation-card {
  display: grid;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.smart-system-link {
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.smart-system-link strong,
.smart-system-link small {
  display: block;
}

.smart-system-link strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-system-link small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-system-link i {
  color: var(--muted);
  font-size: 18px;
  font-style: normal;
  text-align: right;
}

.smart-relation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.smart-relation-card {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.smart-relation-card:not(:has(img)) {
  grid-template-columns: 1fr;
}

.smart-relation-card img {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  background: var(--soft);
}

.smart-relation-card > span {
  min-width: 0;
}

.smart-relation-card small,
.smart-relation-card strong,
.smart-relation-card p {
  display: block;
}

.smart-relation-card small {
  color: var(--red);
  font-size: 10px;
}

.smart-relation-card strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-relation-card p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 899px) {
  .desktop-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 18px 0;
    border-bottom: 0;
    font-size: 12px;
    line-height: 1.6;
  }

  .desktop-detail-breadcrumb strong {
    flex: 1 1 100%;
    white-space: normal;
  }
}

@media (min-width: 900px) {
  .product-system-links,
  .smart-relation {
    max-width: 940px;
    margin-right: auto;
    margin-left: auto;
  }

  .product-system-links > div,
  .smart-relation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* WO-004: visible, type-specific contact actions on detail pages. */
.detail-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
  margin: 30px 18px 34px;
  padding: 26px 28px;
  border: 1px solid #f0d4d6;
  border-left: 4px solid var(--red);
  background: linear-gradient(135deg, #fff8f8, #fff);
  box-shadow: 0 8px 24px #1e293b0c;
}

.detail-cta-copy {
  min-width: 0;
}

.detail-cta-copy > span {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.detail-cta h2 {
  margin: 6px 0 7px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.4;
}

.detail-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.detail-cta-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.detail-cta-contact {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: 10px 24px;
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid #f2dfe0;
}

.detail-cta-system .detail-cta-action {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.detail-cta .detail-cta-contact-item {
  display: block;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--red);
  font-weight: 400;
  text-decoration: none;
}

.detail-cta-contact-item small,
.detail-cta-contact-item strong {
  display: block;
}

/* V2.7: reusable trust panels for content detail pages. */
.detail-trust-panel {
  margin: 28px 18px 30px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  background: #fff;
  box-shadow: 0 8px 22px #172a3410;
}

.detail-trust-panel header > span,
.system-service-flow header > span {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.detail-trust-panel h2,
.system-service-flow h2 {
  margin: 6px 0 7px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.4;
}

.detail-trust-panel header p,
.system-service-flow header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.detail-trust-points,
.detail-service-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.detail-trust-points span,
.detail-service-checks span {
  display: block;
  padding: 12px 14px;
  border: 1px solid #f0d4d6;
  background: #fff8f8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.detail-reading-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.detail-reading-links a {
  display: flex;
  min-width: 0;
  min-height: 92px;
  padding: 14px;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.detail-reading-links a:hover,
.detail-reading-links a:focus-visible {
  border-color: var(--red);
}

.detail-reading-links strong {
  font-size: 14px;
  line-height: 1.45;
}

.detail-reading-links span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.detail-reading-links i {
  margin-top: auto;
  color: var(--red);
  font-size: 16px;
  font-style: normal;
  line-height: 1;
  text-align: right;
}

.system-service-flow {
  margin: 30px 18px 32px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: #f8faf9;
}

.system-service-flow-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.system-service-flow-step {
  position: relative;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.system-service-flow-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -8px;
  z-index: 1;
  color: var(--red);
  content: "→";
  font-size: 14px;
}

.system-service-flow-step span {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

.system-service-flow-step strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .detail-trust-panel,
  .system-service-flow {
    max-width: 940px;
    margin-right: auto;
    margin-left: auto;
  }
}

.detail-cta-contact-item small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.detail-cta-contact-item strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

@media (max-width: 649px) {
  .detail-cta {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 26px 18px 30px;
    padding: 22px 18px;
  }

  .detail-cta h2 {
    font-size: 20px;
  }

  .detail-cta-contact,
  .detail-cta-system .detail-cta-action {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-cta-contact-email {
    flex-basis: 100%;
  }

  .detail-cta-action {
    width: 100%;
  }

  .detail-trust-panel,
  .system-service-flow {
    margin-right: 18px;
    margin-left: 18px;
    padding: 20px 18px;
  }

  .detail-trust-points,
  .detail-service-checks,
  .detail-reading-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-service-flow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-service-flow-step:not(:last-child)::after {
    display: none;
  }
}

/* WO-005: make the content path and neighboring entries easier to discover. */
.system-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.system-quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.system-quick-nav a:hover,
.system-quick-nav a:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.system-summary,
.system-info-grid > section,
.system-related,
.system-article-list {
  scroll-margin-top: 86px;
}

.content-adjacent {
  margin: 30px 18px 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.content-adjacent-heading {
  display: block;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.content-adjacent-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.content-adjacent-links a {
  display: flex;
  min-width: 0;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.content-adjacent-links a:hover,
.content-adjacent-links a:focus-visible {
  border-color: var(--red);
}

.content-adjacent-links small {
  display: block;
  color: var(--red);
  font-size: 10px;
}

.content-adjacent-links strong {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (min-width: 900px) {
  .system-quick-nav,
  .content-adjacent {
    max-width: 940px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 649px) {
  .system-quick-nav {
    margin-right: 18px;
    margin-left: 18px;
  }

  .content-adjacent-links a {
    min-height: 84px;
    padding-right: 11px;
    padding-left: 11px;
  }
}
