/* ==========================================================================
   NAKAJP Phase 5.2 — All-page responsive content system
   Scope: body.jp-responsive-content-page
   Purpose: desktop depth + mobile scan-first + semantic progressive disclosure
   Tracking/form behavior: none
   ========================================================================== */

:root {
  --jp-content-measure: 68ch;
  --jp-content-measure-mobile: 42ch;
  --jp-detail-line: rgba(47, 67, 54, 0.20);
  --jp-detail-bg: rgba(238, 242, 236, 0.62);
  --jp-detail-focus: #435a49;
}

body.jp-responsive-content-page .jp-section-core > :where(p, ul, ol),
body.jp-responsive-content-page .jp-responsive-detail__content > :where(p, ul, ol) {
  max-width: var(--jp-content-measure);
}

body.jp-responsive-content-page details.jp-responsive-detail {
  margin: 24px 0 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--jp-detail-line);
  border-radius: 0;
  box-shadow: none;
}

body.jp-responsive-content-page details.jp-responsive-detail > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 14px 0;
  color: var(--jp-green-ink, #26362c);
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

body.jp-responsive-content-page details.jp-responsive-detail > summary::-webkit-details-marker {
  display: none;
}

body.jp-responsive-content-page details.jp-responsive-detail > summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--jp-detail-line);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--jp-detail-focus);
  font-size: 1.05rem;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

body.jp-responsive-content-page details.jp-responsive-detail[open] > summary::after {
  content: "−";
  transform: rotate(180deg);
  background: rgba(67, 90, 73, 0.08);
  border-color: rgba(67, 90, 73, 0.34);
}

body.jp-responsive-content-page details.jp-responsive-detail > summary:focus-visible {
  outline: 3px solid rgba(67, 90, 73, 0.30);
  outline-offset: 5px;
  border-radius: 4px;
}

body.jp-responsive-content-page .jp-responsive-detail__content {
  padding: 4px 0 8px;
}

body.jp-responsive-content-page details.jp-responsive-detail[open] [data-jp-reveal],
body.jp-responsive-content-page details.jp-responsive-detail[open] [data-jp-stagger-item] {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  mask-image: none !important;
  visibility: visible !important;
}

/* Desktop: supporting detail is part of the editorial flow, not an extra card. */
@media (min-width: 769px) {
  body.jp-responsive-content-page details.jp-responsive-detail {
    margin-top: 28px;
    border-top-color: rgba(47, 67, 54, 0.12);
  }

  body.jp-responsive-content-page details.jp-responsive-detail > summary {
    display: none;
  }

  body.jp-responsive-content-page details.jp-responsive-detail > .jp-responsive-detail__content {
    display: block !important;
    padding-top: 0;
  }

  body.jp-responsive-content-page details.jp-responsive-detail--inline {
    margin-top: 0;
    border-top: 0;
  }
}

/* Mobile: core stays visible; supporting detail becomes a clear semantic disclosure. */
@media (max-width: 768px) {
  body.jp-responsive-content-page .jp-section-core > :where(p, ul, ol),
  body.jp-responsive-content-page .jp-responsive-detail__content > :where(p, ul, ol) {
    max-width: var(--jp-content-measure-mobile);
  }

  body.jp-responsive-content-page details.jp-responsive-detail {
    margin-top: 18px;
  }

  body.jp-responsive-content-page details.jp-responsive-detail > summary {
    min-height: 52px;
    padding: 14px 0;
    font-size: 0.96rem;
  }

  body.jp-responsive-content-page details.jp-responsive-detail > .jp-responsive-detail__content {
    padding: 4px 0 2px;
  }

  body.jp-responsive-content-page details.jp-responsive-detail .mobile-compact-list,
  body.jp-responsive-content-page details.jp-responsive-detail .mobile-compact-steps {
    margin-top: 4px !important;
  }

  body.jp-responsive-content-page details.jp-responsive-detail .mobile-compact-list li,
  body.jp-responsive-content-page details.jp-responsive-detail .mobile-compact-steps li {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* --------------------------------------------------------------------------
   Brand home
   -------------------------------------------------------------------------- */
body.page-index.jp-responsive-content-page #foundation details.more-standards,
body.page-index.jp-responsive-content-page #workflow details.mobile-more-steps {
  background: transparent !important;
  box-shadow: none !important;
}

@media (min-width: 1024px) {
  body.page-index.jp-responsive-content-page #foundation .foundation-grid,
  body.page-index.jp-responsive-content-page #workflow .workflow-grid {
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   LP004 — active style: core first, supporting detail second
   -------------------------------------------------------------------------- */
body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
  .lp004-style-content-group--conditions > .lp004-style-field:first-child {
  margin-bottom: 0;
}

body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
  .lp004-style-supporting {
  margin-top: 18px;
}

body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
  .lp004-style-supporting .jp-responsive-detail__content {
  display: grid;
  gap: 14px;
}

@media (min-width: 769px) {
  body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
    .lp004-style-supporting .jp-responsive-detail__content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
    .lp004-selector-panel__content {
    gap: 16px;
  }

  body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
    .lp004-style-content-grid {
    display: block;
  }

  body.page-thiet-ke-phong-cach-nhat.jp-responsive-content-page
    .lp004-style-content-group--core {
    margin-bottom: 14px;
  }
}

/* --------------------------------------------------------------------------
   LP005 — keep four-factor/service logic visible; collapse secondary proof only
   -------------------------------------------------------------------------- */
body.page-dich-vu-tu-van-tham-dinh-bao-gia-chuyen-sau.jp-responsive-content-page
  #missing-quote-items .jp-responsive-detail__content {
  display: grid;
  gap: 16px;
}

@media (min-width: 769px) {
  body.page-dich-vu-tu-van-tham-dinh-bao-gia-chuyen-sau.jp-responsive-content-page
    #missing-quote-items .jp-responsive-detail__content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.page-dich-vu-tu-van-tham-dinh-bao-gia-chuyen-sau.jp-responsive-content-page
    #missing-quote-items .nakajp-depth-grid {
    grid-template-columns: 1fr;
  }

  body.page-dich-vu-tu-van-tham-dinh-bao-gia-chuyen-sau.jp-responsive-content-page
    #missing-quote-items .jp-responsive-detail__content article {
    padding: 14px 0;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(67, 90, 73, 0.16);
    border-radius: 0;
    box-shadow: none;
  }
}

/* --------------------------------------------------------------------------
   LP006 — canonical service content + lighter supporting detail
   -------------------------------------------------------------------------- */
body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
  #service .process-callout.jp-responsive-detail {
  margin-top: 34px;
  padding-left: 20px;
  border-top: 0;
  border-left: 3px solid rgba(169, 133, 58, 0.72);
}

body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
  #service .process-callout.jp-responsive-detail > summary {
  padding-top: 0;
}

body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
  #quality-control .lp006-zero-gap-detail {
  margin-top: 18px;
  border-top-color: rgba(47, 67, 54, 0.18);
}

body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
  #quality-control .lp006-zero-gap-detail > summary {
  color: #2f4336;
}

@media (min-width: 769px) {
  body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
    #service .process-callout.jp-responsive-detail > .jp-responsive-detail__content {
    padding: 0;
  }
}

@media (max-width: 768px) {
  body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
    #service .process-callout.jp-responsive-detail {
    margin-top: 26px;
    padding-left: 16px;
  }

  body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
    #quality-control .lp006-zero-gap-detail {
    margin-top: 14px;
  }

  body.page-thiet-ke-thi-cong-noi-that-nhat-ban.jp-responsive-content-page
    #quality-control .lp006-zero-gap-detail .lp006-usp-checklist {
    margin-top: 4px;
  }
}

/* --------------------------------------------------------------------------
   Eight dual-copy Ads/build pages — mobile supporting detail
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body.jp-responsive-content-page .mobile-copy details.jp-responsive-detail {
    margin-top: 14px;
  }

  body.jp-responsive-content-page .mobile-copy details.jp-responsive-detail > summary {
    color: #2f4336;
    border-bottom: 0;
  }

  body.jp-responsive-content-page .mobile-copy details.jp-responsive-detail .mobile-compact-list,
  body.jp-responsive-content-page .mobile-copy details.jp-responsive-detail .mobile-compact-steps {
    padding-left: 0;
  }
}

/* Tables remain readable rather than being scaled down. */
body.jp-responsive-content-page .jp-responsive-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

body.jp-responsive-content-page .jp-responsive-table-wrap > table {
  min-width: 680px;
}

@media (prefers-reduced-motion: reduce) {
  body.jp-responsive-content-page details.jp-responsive-detail > summary::after {
    transition: none !important;
  }

  body.jp-responsive-content-page details.jp-responsive-detail[open] [data-jp-reveal],
  body.jp-responsive-content-page details.jp-responsive-detail[open] [data-jp-stagger-item] {
    transition: none !important;
  }
}
