/* Source-native reading layouts, chapter navigation and grouped form sections. */
body.ndsp-refined main > .section-content { padding-block: clamp(38px, 5vw, 70px); }
body.ndsp-refined .ndsp-reading-section { padding-block: clamp(28px, 4vw, 56px); }
body.ndsp-refined .ndsp-reading-section > .container { max-width: 1120px; }
body.ndsp-refined .ndsp-reading-layout { display: block; margin: 0; }
body.ndsp-refined .ndsp-reading-title,
body.ndsp-refined .ndsp-reading-body { width: 100%; max-width: 100%; padding: 0; }
body.ndsp-refined .ndsp-reading-title { max-width: 840px; margin: 0 0 24px; }
body.ndsp-refined .ndsp-reading-title .heading { margin: 0; padding: 0; text-align: left; background-image: none; }
body.ndsp-refined .ndsp-reading-title .heading::after { display: none; }
body.ndsp-refined .ndsp-reading-title h2 { font-size: clamp(28px, 2.7vw, 38px); }
body.ndsp-refined .ndsp-reading-body { display: flow-root; max-width: 920px; text-align: left; }
body.ndsp-refined .ndsp-reading-body p { margin-bottom: 16px; line-height: 1.75; }
body.ndsp-refined .ndsp-reading-body :is(h3, .h3) { margin: 30px 0 12px; font-size: 24px; }
body.ndsp-refined .ndsp-reading-body :is(ul, ol) { padding-left: 24px; margin-bottom: 24px; }
body.ndsp-refined .ndsp-reading-body li { margin-bottom: 8px; }
body.ndsp-refined .ndsp-with-photo .ndsp-reading-body { max-width: none; }
body.ndsp-refined img.ndsp-editorial-image {
  float: right; width: 44% !important; max-width: 460px;
  height: auto; margin: 0 0 24px 40px; border-radius: 20px !important;
  aspect-ratio: 3 / 2 !important; object-fit: cover;
}
body.ndsp-refined .ndsp-reading-body .ndsp-actions { clear: both; }
body.ndsp-refined .ndsp-list-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 32px; margin-block: 20px 28px;
}
body.ndsp-refined .ndsp-with-photo .ndsp-list-grid { display: block; }
body.ndsp-refined .ndsp-step-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px; counter-reset: ndsp-step;
}
body.ndsp-refined .ndsp-step {
  border-top: 2px solid var(--brand-lavender); padding: 20px 0;
  counter-increment: ndsp-step;
}
body.ndsp-refined .ndsp-step :is(h3, h4) { margin-top: 0; font-size: 23px; }
body.ndsp-refined .ndsp-address-line { font-size: 18px; line-height: 1.6; font-weight: 400; }

/* Existing ZIP chapter names make a native, editable contents panel. */
body.ndsp-refined .ndsp-page-index {
  width: min(1120px, calc(100% - 48px)); margin: 24px auto 18px;
  background: var(--brand-surface); border: 1px solid #ddd3e8; border-radius: 16px;
}
body.ndsp-refined .ndsp-index-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; list-style: none; padding: 18px 24px;
  color: var(--brand-navy); font-weight: 700; font-size: 15px; letter-spacing: .06em;
}
body.ndsp-refined .ndsp-index-toggle::after { content: '+'; font-size: 24px; line-height: 1; }
body.ndsp-refined .ndsp-page-index[open] > .ndsp-index-toggle::after { content: '−'; }
body.ndsp-refined .ndsp-index-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px;
  padding: 0 24px 24px; margin: 0; list-style: none;
}
body.ndsp-refined .ndsp-index-link {
  display: block; padding: 8px 0; color: var(--brand-navy); font-size: 15px;
  line-height: 1.5; border-bottom: 1px solid #e0d7e8; text-decoration: none;
}
body.ndsp-refined .ndsp-index-link:hover { color: var(--brand-heading); text-decoration: underline; }

/* Each authored referral section stays native and editable inside a step. */
body.ndsp-refined .ndsp-referral-steps { counter-reset: referral-step; }
body.ndsp-refined .ndsp-referral-steps .ndsp-form-section { padding-block: 8px; counter-increment: referral-step; }
body.ndsp-refined .ndsp-form-step { border: 1px solid #d9d0e5; border-radius: 16px; background: #fff; }
body.ndsp-refined .ndsp-form-step-title {
  display: flex; gap: 18px; align-items: center; padding: 20px 24px;
  cursor: pointer; list-style: none;
}
body.ndsp-refined .ndsp-form-step-title::before {
  content: counter(referral-step, decimal-leading-zero); color: var(--brand-action);
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
}
body.ndsp-refined .ndsp-form-step-title::after { content: '+'; margin-left: auto; font-size: 26px; }
body.ndsp-refined .ndsp-form-step[open] > .ndsp-form-step-title::after { content: '−'; }
body.ndsp-refined .ndsp-form-step-title h2 { margin: 0; padding: 0; font-size: 24px; text-align: left; background-image: none; }
body.ndsp-refined .ndsp-form-step-title h2::after { display: none; }
body.ndsp-refined .ndsp-form-step > .ndsp-reading-body { padding: 8px 28px 28px; }
body.ndsp-refined .ndsp-form-step[open] { border-color: var(--brand-action); }
body.ndsp-refined summary::-webkit-details-marker { display: none; }
body.ndsp-refined summary:focus-visible { outline: 3px solid var(--brand-lavender); outline-offset: 4px; }
@media (max-width: 700px) {
  body.ndsp-refined .ndsp-reading-section > .container { padding-inline: 24px; }
  body.ndsp-refined img.ndsp-editorial-image { float: none; width: 100% !important; max-width: none; margin: 0 0 24px; }
  body.ndsp-refined .ndsp-list-grid, body.ndsp-refined .ndsp-step-grid, body.ndsp-refined .ndsp-index-list { grid-template-columns: 1fr; }
  body.ndsp-refined .ndsp-form-step-title { gap: 12px; padding: 18px; }
  body.ndsp-refined .ndsp-form-step-title h2 { font-size: 20px; }
  body.ndsp-refined .ndsp-form-step > .ndsp-reading-body { padding: 4px 18px 20px; }
}
