/* Shared mobile/desktop polish. Loaded last by site-controls.js so it can
   fill gaps in per-page <style> blocks without editing each page. */

/* --- Related guides: tool pages paste the blog markup without the CSS --- */
.related-guides {
  margin: 48px 0 8px;
  padding-top: 28px;
  border-top: 2px solid #E2E4E9;
  max-width: 100%;
}
.related-guides h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #00247D;
  line-height: 1.25;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
a.related-card,
.related-card {
  display: block;
  background: #fff;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid #E2E4E9;
  text-decoration: none;
  min-width: 0;
  box-sizing: border-box;
}
a.related-card:hover,
.related-card:hover {
  border-color: #CC142B;
  text-decoration: none;
}
a.related-card h3,
.related-card h3,
a.related-card h4,
.related-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #00247D;
  margin: 0 0 4px;
  line-height: 1.35;
}
a.related-card p,
.related-card p {
  font-size: 0.875rem;
  color: #52525B;
  margin: 0;
  line-height: 1.5;
}
/* Next-steps blocks that sit outside .container, flush with the viewport. */
body > section:has(> .related-guides) {
  box-sizing: border-box;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 8px 24px 48px;
}
@media (max-width: 640px) {
  .related-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- Article gutters: 16px outliers up to the 24px standard; 36px layout cards down to 24px --- */
@media (max-width: 640px) {
  .page-wrap:has(.article-wrap:not(.content)),
  .breadcrumb:has(+ .page-wrap .article-wrap:not(.content)) {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
@media (max-width: 800px) {
  main.layout {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  main.layout > .article {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* site-controls pads every header; article titles should share the body gutter. */
  article > header,
  .article > header {
    padding: 0 !important;
  }
}


/* Shared SettleNZ contrast, text and keyboard refinements. */
.breadcrumb,.article-meta,.page-header p,.source-note,figcaption{color:#52525B}
.breadcrumb,.toc a,.toc-sidebar .toc a,.toc-inline a,.toc-inline ol,.toc-inline summary,.article-meta,.source-note,figcaption{font-size:.875rem}
.related-card:hover h3,.blog-card:hover h2,.guide-card:hover h2{text-decoration:underline}
@media(max-width:640px){article li>a,.article-wrap li>a{display:inline-block;max-width:100%;overflow-wrap:anywhere;padding-top:12px;padding-bottom:12px;min-height:44px;line-height:20px}}
