/**
 * Legal / sitemap / soft-error pages on Make shell (index.css skipped via pl_line_shell).
 * Legal document on resource hero shell — site container width + section rhythm.
 */

body.make-site.nw-legal-page {
  --nw-legal-ink: #1a2b42;
  --nw-legal-muted: #5a6575;
  --nw-legal-line: rgba(215, 224, 236, 0.95);
  --nw-legal-soft: #f5f7fb;
  background: #fff;
}

/* Pull body closer to hero tabs; width from site .container */
body.make-site.nw-legal-page .nw-resource-hero__inner {
  padding-bottom: 20px;
}

body.make-site.nw-legal-page .nw-resource-nav {
  gap: 14px;
}

body.make-site .nw-legal-main {
  width: 100%;
  padding: 16px 0 72px;
  background: #fff;
}

/*
 * Legal pages are not .nw-resource-page, so --nw-res-line is undefined and the
 * shared pill border is dropped — inactive tab collapses to bare text on hero.
 */
body.make-site.nw-legal-page .nw-resource-nav__link {
  border: 1px solid rgba(215, 224, 236, 0.95);
  background: #fff;
  color: #3d5277;
}

body.make-site.nw-legal-page .nw-resource-nav__link:hover {
  border-color: #c5d0e8;
  color: var(--main-color);
}

body.make-site.nw-legal-page .nw-resource-nav__link.is-active {
  border-color: transparent;
  background: var(--main-color);
  color: #fff;
}

body.make-site .nw-legal-doc {
  width: 100%;
  margin: 0;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--nw-legal-line);
  border-radius: 12px;
  background: #fff;
}

body.make-site .nw-legal-doc__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--nw-legal-line);
  font-size: var(--nw-fs-meta);
  color: #7a8aa5;
}

body.make-site .nw-legal-doc__meta strong {
  color: var(--main-color);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size:var(--nw-fs-meta);
}

body.make-site .legal-content {
  color: var(--nw-legal-muted);
  line-height: 1.8;
  font-size: var(--nw-fs-body);
  font-family: "DM Sans", system-ui, sans-serif;
}

body.make-site .legal-content > :first-child {
  margin-top: 0;
}

body.make-site .legal-content h2,
body.make-site .legal-content h3,
body.make-site .legal-content h4 {
  font-family: var(--font-heading, "Manrope", sans-serif);
  color: var(--nw-legal-ink);
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

body.make-site .legal-content h2 {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--nw-legal-line);
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 650;
  line-height: 1.3;
}

body.make-site .legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

body.make-site .legal-content h3 {
  margin: 28px 0 0;
  font-size: var(--nw-fs-lead);
  font-weight: 650;
}

body.make-site .legal-content h4 {
  margin: 22px 0 0;
  font-size: var(--nw-fs-body);
  font-weight: 650;
}

body.make-site .legal-content p {
  margin: 14px 0 0;
  line-height: 1.85;
}

body.make-site .legal-content ul,
body.make-site .legal-content ol {
  margin: 14px 0 0;
  padding-left: 1.25em;
}

body.make-site .legal-content li {
  margin-top: 8px;
  padding-left: 4px;
  line-height: 1.75;
}

body.make-site .legal-content li::marker {
  color: var(--main-color);
}

body.make-site .legal-content a {
  color: var(--main-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.make-site .legal-content a:hover {
  text-decoration-thickness: 2px;
}

body.make-site .legal-content strong,
body.make-site .legal-content b {
  color: var(--nw-legal-ink);
  font-weight: 650;
}

body.make-site .legal-content blockquote {
  margin: 20px 0 0;
  padding: 16px 18px;
  background: var(--nw-legal-soft);
  border-radius: 10px;
  color: var(--nw-legal-ink);
}

body.make-site .legal-content table {
  width: 100%;
  margin: 20px 0 0;
  border-collapse: collapse;
  font-size: var(--nw-fs-secondary);
}

body.make-site .legal-content th,
body.make-site .legal-content td {
  padding: 10px 12px;
  border: 1px solid var(--nw-legal-line);
  text-align: left;
  vertical-align: top;
}

body.make-site .legal-content th {
  background: var(--nw-legal-soft);
  color: var(--nw-legal-ink);
  font-weight: 650;
}

body.make-site .legal-content hr {
  margin: 36px 0;
  border: 0;
  border-top: 1px solid var(--nw-legal-line);
}

body.make-site .legal-content img,
body.make-site .legal-content video,
body.make-site .legal-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Sitemap — intro lives in resource hero only; XML link matches legal tab pills */
body.make-site .sitemap-xml-link {
  margin: 0 0 28px;
}

body.make-site .sitemap-xml-link .nw-resource-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(215, 224, 236, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #3d5277;
  font-size: var(--nw-fs-meta);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.make-site .sitemap-xml-link .nw-resource-nav__link:hover {
  border-color: #c5d0e8;
  color: var(--main-color);
}

body.make-site .sitemap-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 0;
}

body.make-site .sitemap-group {
  padding: 24px;
  border: 1px solid var(--nw-legal-line);
  border-radius: 12px;
  background: #fff;
}

body.make-site .sitemap-group h2 {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nw-border);
  font-size: var(--nw-fs-lead);
  font-weight: 650;
  color: var(--nw-legal-ink);
  font-family: var(--font-heading, "Manrope", sans-serif);
}

body.make-site .sitemap-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

body.make-site .sitemap-links a {
  display: inline-block;
  line-height: 1.7;
  padding: 4px 0;
  color: var(--nw-legal-ink);
  text-decoration: none;
}

body.make-site .sitemap-links a:hover {
  color: var(--main-color);
}

@media (min-width: 768px) {
  body.make-site .sitemap-groups {
    grid-template-columns: 1fr 1fr;
  }

  body.make-site .sitemap-group--wide {
    grid-column: 1 / -1;
  }

  body.make-site .sitemap-group--wide .sitemap-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1280px) {
  body.make-site .sitemap-groups {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }

  body.make-site .sitemap-group--wide .sitemap-links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Soft 404 / miss */
body.make-site .nw-miss {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

body.make-site .nw-miss img {
  max-width: 280px;
  height: auto;
}

body.make-site .nw-miss h1 {
  margin: 40px 0 0;
  font-size: 28px;
  font-weight: 650;
  color: var(--nw-legal-ink);
  font-family: var(--font-heading, "Manrope", sans-serif);
}

body.make-site .nw-miss p {
  margin: 16px 0 0;
  color: #8497d3;
}

body.make-site .nw-miss .button {
  margin-top: 28px;
}

@media (max-width: 640px) {
  body.make-site .legal-content {
    font-size: var(--nw-fs-secondary);
  }
}

/*
 * Phone ≤960 — Privacy / Agreement / Sitemap.
 * Same chrome as Downloads/FAQ: no crumb · compact hero · tighter body.
 */
@media (max-width: 960px) {
  body.make-site.nw-legal-page .nw-resource-hero__crumb {
    display: none !important;
  }

  body.make-site.nw-legal-page .nw-resource-hero__inner {
    padding-block: 16px 18px !important;
  }

  body.make-site.nw-legal-page .nw-resource-hero__kicker {
    margin-bottom: 10px !important;
    font-size: var(--nw-fs-meta) !important;
    letter-spacing: 0.08em !important;
  }

  body.make-site.nw-legal-page .nw-resource-hero h1 {
    max-width: none !important;
    font-size: var(--nw-fs-display) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
  }

  body.make-site.nw-legal-page .nw-resource-hero__lead {
    margin-top: 10px !important;
    max-width: none !important;
    font-size: var(--nw-fs-body) !important;
    line-height: 1.55 !important;
  }

  body.make-site.nw-legal-page .nw-resource-nav {
    gap: 8px !important;
    margin-top: 16px !important;
  }

  body.make-site.nw-legal-page .nw-resource-nav__link {
    min-height: 40px !important;
    padding-inline: 14px !important;
  }

  body.make-site.nw-legal-page .nw-legal-main {
    padding-block: 16px 48px !important;
  }

  body.make-site.nw-legal-page .nw-legal-doc {
    padding: 18px 16px !important;
    border-radius: 12px !important;
  }

  body.make-site.nw-legal-page .nw-legal-doc__meta {
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
  }

  body.make-site.nw-legal-page .sitemap-xml-link {
    margin-bottom: 16px !important;
  }

  body.make-site.nw-legal-page .sitemap-groups {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body.make-site.nw-legal-page .sitemap-group {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  body.make-site.nw-legal-page .sitemap-group h2 {
    font-size: var(--nw-fs-title) !important;
    margin-bottom: 12px !important;
  }

  body.make-site.nw-legal-page .sitemap-group--wide {
    grid-column: auto !important;
  }

  body.make-site.nw-legal-page .sitemap-group--wide .sitemap-links {
    grid-template-columns: 1fr !important;
  }
}
