/*
 * SPM Advisors resource guides
 * Working-document layout that complements the existing navy, cream, and gold identity.
 */

body.guide-document {
  --guide-navy: #0F2847;
  --guide-navy-deep: #0A1628;
  --guide-gold: #C9A227;
  --guide-gold-deep: #80600A;
  --guide-paper: #FFFDF8;
  --guide-ground: #E9E7DF;
  --guide-ink: #182538;
  --guide-muted: #536274;
  --guide-rule: #D6DCE2;
  --guide-soft: #F3F1E9;
  margin: 0;
  min-height: 100dvh;
  background: var(--guide-ground);
  color: var(--guide-ink);
  font-family: var(--spm-font, 'Roboto', sans-serif);
  font-size: 16px;
  line-height: 1.62;
}

body.guide-document *,
body.guide-document *::before,
body.guide-document *::after {
  box-sizing: border-box;
}

body.guide-document main a {
  color: var(--guide-gold-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

body.guide-document main a:hover {
  color: var(--guide-navy);
}

body.guide-document :focus-visible {
  outline: 3px solid var(--guide-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

body.guide-document .guide-toolbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 10px max(20px, calc((100vw - 1040px) / 2));
  background: rgba(247, 246, 241, .97);
  border-bottom: 1px solid #D6D4CC;
  box-shadow: 0 3px 12px rgba(10, 22, 40, .07);
  backdrop-filter: blur(8px);
}

body.guide-document .guide-toolbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

body.guide-document .guide-toolbar a,
body.guide-document .guide-toolbar button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid #BCC5CE;
  border-radius: 4px;
  background: transparent;
  color: var(--guide-navy);
  font: 600 13px/1.3 var(--spm-font, 'Roboto', sans-serif);
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
}

body.guide-document .guide-toolbar a:hover,
body.guide-document .guide-toolbar button:hover {
  border-color: var(--guide-gold);
  background: #F2E8CF;
  color: var(--guide-navy-deep);
}

body.guide-document .guide-toolbar .guide-library-link {
  border-color: transparent;
  padding-left: 0;
  font-weight: 700;
}

body.guide-document .guide-toolbar .guide-pdf-link,
body.guide-document .guide-toolbar .guide-print-button {
  border-color: var(--guide-gold);
  background: var(--guide-gold);
  color: var(--guide-navy-deep);
  font-weight: 700;
}

body.guide-document .guide-toolbar .guide-pdf-link:hover,
body.guide-document .guide-toolbar .guide-print-button:hover {
  background: #D4AF37;
  transform: translateY(-1px);
}

body.guide-document .guide-reader {
  width: min(100% - 32px, 850px);
  margin: 34px auto 58px;
  color: var(--guide-ink);
}

body.guide-document .guide-sheet {
  position: relative;
  margin: 0 0 28px;
  padding: clamp(28px, 5.4vw, 58px) clamp(22px, 6vw, 68px) 32px;
  background: var(--guide-paper);
  border: 1px solid #E1DED4;
  border-top: 4px solid var(--guide-gold);
  box-shadow: 0 12px 32px rgba(10, 22, 40, .09);
}

body.guide-document .guide-head {
  position: relative;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--guide-rule);
}

body.guide-document .guide-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--guide-navy);
  font: 700 12px/1.25 var(--spm-heading, 'Montserrat', sans-serif);
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.guide-document .guide-brand img {
  display: block;
  width: auto;
  height: 34px;
  max-width: 118px;
  object-fit: contain;
}

body.guide-document .guide-kicker {
  margin: 0 0 8px;
  color: var(--guide-gold-deep);
  font: 700 11px/1.4 var(--spm-heading, 'Montserrat', sans-serif);
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.guide-document .guide-head h1,
body.guide-document .guide-head h2 {
  max-width: 690px;
  margin: 0;
  color: var(--guide-navy);
  font: 700 clamp(29px, 5vw, 40px)/1.12 var(--spm-heading, 'Montserrat', sans-serif);
  letter-spacing: -.035em;
}

body.guide-document .guide-dek {
  max-width: 680px;
  margin: 13px 0 0;
  color: var(--guide-muted);
  font-size: 16px;
  line-height: 1.55;
}

body.guide-document .guide-content {
  padding-top: 17px;
}

body.guide-document .guide-section {
  margin: 0 0 21px;
}

body.guide-document .guide-section > h2,
body.guide-document .guide-content > h2 {
  margin: 0 0 8px;
  padding-left: 11px;
  border-left: 3px solid var(--guide-gold);
  color: var(--guide-navy);
  font: 700 18px/1.35 var(--spm-heading, 'Montserrat', sans-serif);
}

body.guide-document .guide-section h3,
body.guide-document .guide-content h3 {
  margin: 15px 0 5px;
  color: var(--guide-navy);
  font: 700 14px/1.4 var(--spm-heading, 'Montserrat', sans-serif);
}

body.guide-document .guide-content p {
  margin: 7px 0 10px;
  color: var(--guide-ink);
  font-size: 14px;
  line-height: 1.58;
}

body.guide-document .guide-content strong {
  color: var(--guide-navy);
}

body.guide-document .guide-checklist {
  display: grid;
  gap: 7px;
  margin: 10px 0 14px;
  padding: 0;
  list-style: none;
}

body.guide-document .guide-checklist li {
  position: relative;
  min-height: 22px;
  padding-left: 28px;
  color: var(--guide-ink);
  font-size: 14px;
  line-height: 1.5;
}

body.guide-document .guide-checklist li::before {
  position: absolute;
  top: .18em;
  left: 2px;
  width: 14px;
  height: 14px;
  border: 1.25px solid #7D8792;
  background: transparent;
  content: "";
}

body.guide-document .guide-questions {
  display: grid;
  gap: 11px;
  margin: 13px 0 18px;
}

body.guide-document .guide-question {
  padding: 0 0 10px 14px;
  border-left: 2px solid #D8C477;
  border-bottom: 1px solid #E6E3DA;
  break-inside: avoid;
}

body.guide-document .guide-question h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

body.guide-document .guide-question p {
  margin: 4px 0;
  color: var(--guide-muted);
  font-size: 13px;
}

body.guide-document .guide-callout {
  margin: 16px 0;
  padding: 13px 16px;
  border-left: 3px solid var(--guide-gold);
  background: var(--guide-soft);
}

body.guide-document .guide-callout > :first-child {
  margin-top: 0;
}

body.guide-document .guide-callout > :last-child {
  margin-bottom: 0;
}

body.guide-document .guide-callout.guide-caution {
  border-left-color: var(--guide-navy);
  background: #EEF1F3;
}

body.guide-document .guide-table-wrap {
  max-width: 100%;
  margin: 14px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--guide-rule);
  overscroll-behavior-inline: contain;
}

body.guide-document .guide-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--guide-ink);
  font-size: 13px;
  line-height: 1.4;
}

body.guide-document .guide-table caption {
  padding: 9px 11px;
  background: var(--guide-soft);
  color: var(--guide-navy);
  font: 700 12px/1.4 var(--spm-heading, 'Montserrat', sans-serif);
  text-align: left;
}

body.guide-document .guide-table th,
body.guide-document .guide-table td {
  min-width: 115px;
  padding: 8px 10px;
  border: 1px solid var(--guide-rule);
  text-align: left;
  vertical-align: top;
}

body.guide-document .guide-table thead th {
  background: #F4F2EB;
  color: var(--guide-navy);
  font-weight: 700;
}

body.guide-document .guide-table td {
  height: 34px;
}

body.guide-document .guide-sources {
  margin: 17px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--guide-rule);
  color: var(--guide-muted);
  font-size: 12px;
  line-height: 1.5;
}

body.guide-document .guide-sources h2,
body.guide-document .guide-sources h3 {
  margin: 0 0 7px;
  color: var(--guide-navy);
  font: 700 12px/1.4 var(--spm-heading, 'Montserrat', sans-serif);
}

body.guide-document .guide-sources ul {
  margin: 0;
  padding-left: 18px;
}

body.guide-document .guide-sources li {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

body.guide-document .guide-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 0;
  padding: 15px 16px;
  background: var(--guide-navy);
  color: #F7F6F1;
}

body.guide-document .guide-contact p {
  margin: 0;
  color: #F7F6F1;
  font-size: 13px;
}

body.guide-document .guide-contact a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--guide-gold);
  border-radius: 3px;
  background: var(--guide-gold);
  color: var(--guide-navy-deep);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

body.guide-document .guide-contact a:hover {
  background: #D4AF37;
}

body.guide-document .guide-page-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--guide-rule);
  color: var(--guide-muted);
  font-size: 10px;
  line-height: 1.45;
}

body.guide-document .guide-page-footer p {
  max-width: 600px;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

body.guide-document .guide-page-footer .guide-page-count {
  flex: 0 0 auto;
  color: var(--guide-navy);
  font-weight: 700;
  white-space: nowrap;
}

body[data-theme="dark"].guide-document {
  --guide-paper: #142337;
  --guide-ground: #0B1726;
  --guide-ink: #E4EAF0;
  --guide-muted: #C0CBD7;
  --guide-rule: #405166;
  --guide-soft: #1D3046;
  --guide-navy: #E7D28A;
  --guide-gold-deep: #E7D28A;
  background: var(--guide-ground);
  color: var(--guide-ink);
}

body[data-theme="dark"].guide-document .guide-toolbar {
  background: rgba(16, 29, 45, .97);
  border-color: #314155;
}

body[data-theme="dark"].guide-document .guide-toolbar a,
body[data-theme="dark"].guide-document .guide-toolbar button {
  border-color: #45566A;
  color: #F4F0E7;
}

body[data-theme="dark"].guide-document .guide-toolbar .guide-pdf-link,
body[data-theme="dark"].guide-document .guide-toolbar .guide-print-button {
  border-color: var(--guide-gold);
  background: var(--guide-gold);
  color: var(--guide-navy-deep);
}

body[data-theme="dark"].guide-document .guide-sheet {
  border-color: #314155;
  border-top-color: var(--guide-gold);
  color: var(--guide-ink);
}

body[data-theme="dark"].guide-document .guide-content p,
body[data-theme="dark"].guide-document .guide-content li,
body[data-theme="dark"].guide-document .guide-table {
  color: var(--guide-ink);
}

body[data-theme="dark"].guide-document .guide-content strong {
  color: #F0D875;
}

body[data-theme="dark"].guide-document .guide-callout.guide-caution {
  background: #213248;
}

body[data-theme="dark"].guide-document .guide-table thead th {
  background: #20334A;
}

@media (max-width: 600px) {
  body.guide-document {
    font-size: 15px;
  }

  body.guide-document .guide-toolbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 16px;
  }

  body.guide-document .guide-toolbar nav {
    width: 100%;
    gap: 7px;
  }

  body.guide-document .guide-toolbar a,
  body.guide-document .guide-toolbar button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 12px;
  }

  body.guide-document .guide-reader {
    width: calc(100% - 20px);
    margin: 14px auto 30px;
  }

  body.guide-document .guide-sheet {
    margin-bottom: 14px;
    padding: 25px 19px 23px;
  }

  body.guide-document .guide-brand {
    margin-bottom: 22px;
  }

  body.guide-document .guide-head h1,
  body.guide-document .guide-head h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

  body.guide-document .guide-dek {
    font-size: 15px;
  }

  body.guide-document .guide-content p,
  body.guide-document .guide-checklist li {
    font-size: 14px;
  }

  body.guide-document .guide-contact {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.guide-document *,
  body.guide-document *::before,
  body.guide-document *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@page {
  size: Letter;
  margin: .46in .52in .48in;
}

@media print {
  body.guide-document {
    min-height: 0;
    margin: 0;
    background: #fff;
    color: #182538;
    font: 10pt/1.32 var(--spm-font, 'Roboto', sans-serif);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.guide-document > header,
  body.guide-document > footer,
  body.guide-document .guide-toolbar,
  body.guide-document .spm-response-note {
    display: none !important;
  }

  body.guide-document .guide-reader {
    width: auto;
    margin: 0;
    color: #182538;
  }

  body.guide-document main.guide-reader {
    display: block;
  }

  body.guide-document .guide-sheet {
    min-height: 10.06in;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 2pt solid #C9A227;
    background: #fff !important;
    box-shadow: none;
    color: #182538 !important;
    break-after: page;
    page-break-after: always;
    break-inside: auto;
  }

  body.guide-document .guide-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.guide-document .guide-head {
    padding: 0 0 12pt;
    border-color: #D6DCE2;
  }

  body.guide-document .guide-brand {
    gap: 7pt;
    margin: 0 0 15pt;
    color: #0F2847 !important;
    font-size: 8pt;
  }

  body.guide-document .guide-brand img {
    height: 25pt;
    max-width: 92pt;
  }

  body.guide-document .guide-kicker {
    margin-bottom: 5pt;
    color: #80600A !important;
    font-size: 7.5pt;
  }

  body.guide-document .guide-head h1,
  body.guide-document .guide-head h2 {
    color: #0F2847 !important;
    font-size: 23pt;
    line-height: 1.08;
  }

  body.guide-document .guide-dek {
    margin-top: 7pt;
    color: #465569 !important;
    font-size: 10pt;
    line-height: 1.35;
  }

  body.guide-document .guide-content {
    padding-top: 10pt;
  }

  body.guide-document .guide-section {
    margin-bottom: 12pt;
  }

  body.guide-document .guide-section > h2,
  body.guide-document .guide-content > h2 {
    margin-bottom: 5pt;
    padding-left: 7pt;
    border-left-width: 2pt;
    color: #0F2847 !important;
    font-size: 12pt;
    line-height: 1.2;
    break-after: avoid;
    page-break-after: avoid;
  }

  body.guide-document .guide-section h3,
  body.guide-document .guide-content h3 {
    margin: 8pt 0 3pt;
    color: #0F2847 !important;
    font-size: 10.5pt;
    line-height: 1.2;
    break-after: avoid;
    page-break-after: avoid;
  }

  body.guide-document .guide-content p {
    margin: 4pt 0 6pt;
    color: #182538 !important;
    font-size: 10pt;
    line-height: 1.32;
    orphans: 2;
    widows: 2;
  }

  body.guide-document .guide-content strong {
    color: #0F2847 !important;
  }

  body.guide-document .guide-checklist {
    gap: 4pt;
    margin: 6pt 0 9pt;
  }

  body.guide-document .guide-checklist li {
    min-height: 14pt;
    padding-left: 20pt;
    color: #182538 !important;
    font-size: 10pt;
    line-height: 1.28;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.guide-document .guide-checklist li::before {
    top: 1pt;
    left: 1pt;
    width: 10pt;
    height: 10pt;
    border-color: #536274;
  }

  body.guide-document .guide-questions {
    gap: 6pt;
    margin: 8pt 0 11pt;
  }

  body.guide-document .guide-question {
    padding: 0 0 6pt 9pt;
    border-left-width: 1.5pt;
    border-bottom-color: #D6DCE2;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.guide-document .guide-question h3 {
    margin: 0 0 3pt;
    font-size: 10pt;
  }

  body.guide-document .guide-question p {
    margin: 2pt 0;
    color: #465569 !important;
    font-size: 10pt;
    line-height: 1.28;
  }

  body.guide-document .guide-callout {
    margin: 9pt 0;
    padding: 8pt 10pt;
    border-left-width: 2pt;
    background: #F3F1E9 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.guide-document .guide-callout.guide-caution {
    border-left-color: #0F2847;
    background: #EEF1F3 !important;
  }

  body.guide-document .guide-table-wrap {
    margin: 8pt 0 11pt;
    overflow: visible;
    border-color: #C8D0D8;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.guide-document .guide-table {
    width: 100%;
    table-layout: fixed;
    color: #182538 !important;
    font-size: 10pt;
    line-height: 1.2;
  }

  body.guide-document .guide-table caption {
    padding: 5pt 7pt;
    background: #F3F1E9 !important;
    color: #0F2847 !important;
    font-size: 10pt;
  }

  body.guide-document .guide-table th,
  body.guide-document .guide-table td {
    min-width: 0;
    padding: 5pt 6pt;
    border-color: #C8D0D8;
    overflow-wrap: anywhere;
  }

  body.guide-document .guide-table thead th {
    background: #F4F2EB !important;
    color: #0F2847 !important;
  }

  body.guide-document .guide-table td {
    height: 22pt;
  }

  body.guide-document .guide-sources {
    margin-top: 10pt;
    padding-top: 7pt;
    border-color: #D6DCE2;
    color: #465569 !important;
    font-size: 8.5pt;
    line-height: 1.25;
  }

  body.guide-document .guide-sources h2,
  body.guide-document .guide-sources h3 {
    margin-bottom: 4pt;
    color: #0F2847 !important;
    font-size: 9pt;
  }

  body.guide-document .guide-sources li {
    margin: 2pt 0;
  }

  body.guide-document .guide-sources a {
    color: #182538 !important;
    text-decoration: underline;
  }

  body.guide-document .guide-contact {
    margin-top: 11pt;
    padding: 9pt 10pt;
    background: #0F2847 !important;
    color: #F7F6F1 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.guide-document .guide-contact p {
    color: #F7F6F1 !important;
    font-size: 10pt;
  }

  body.guide-document .guide-contact a {
    min-height: 0;
    padding: 6pt 9pt;
    border-color: #C9A227;
    background: #C9A227 !important;
    color: #0A1628 !important;
    font-size: 10pt;
  }

  body.guide-document .guide-page-footer {
    margin-top: 12pt;
    padding-top: 6pt;
    border-color: #D6DCE2;
    color: #536274 !important;
    font-size: 7.5pt;
  }

  body.guide-document .guide-page-footer p,
  body.guide-document .guide-page-footer .guide-page-count {
    color: inherit !important;
  }
}

/* The catalog and generated document contract share this one stylesheet. */
body.guide-document .guide-library{max-width:1040px;margin:auto;padding:48px 24px}
body.guide-document .guide-library h1{font:700 clamp(29px,5vw,42px)/1.18 var(--spm-heading);color:var(--guide-navy)}
body.guide-document .resource-list{display:grid;gap:20px;margin:30px 0}
body.guide-document .resource-option{min-width:0;padding:26px;background:var(--guide-paper);border:1px solid var(--guide-rule);border-left:4px solid var(--guide-gold)}
body.guide-document .resource-option h2{font:700 24px/1.3 var(--spm-heading);color:var(--guide-navy);margin:10px 0}
body.guide-document .resource-option.is-selected{outline:2px solid var(--guide-gold);outline-offset:2px}
body.guide-document .guide-resource-actions{display:flex;flex-wrap:wrap;gap:16px;align-items:center}
body.guide-document .guide-format{font-size:13px;color:var(--guide-muted)}
body.guide-document .guide-brand small{margin-left:auto;font-size:10px;letter-spacing:0}
body.guide-document .guide-contact{display:block}
body.guide-document .guide-contact>strong{display:block;color:#fff;margin-bottom:6px}
body.guide-document .guide-contact p{color:#fff}
body[data-theme="dark"].guide-document .guide-contact{background:#142A43}
body[data-theme="dark"].guide-document .guide-contact>strong{color:#FFF0C7}
body.guide-document .guide-toolbar{position:static;flex-wrap:wrap}
body.guide-document .guide-head,body.guide-document .guide-content{overflow-wrap:anywhere}
body.guide-document .guide-head>h2{margin:0}
body.guide-document .guide-callout>h2{font-size:17px;line-height:1.3;margin:0 0 6px}
body.guide-document .guide-writing-table td{height:42px}
#resourceNotice:empty{display:none}
@media(max-width:600px){
  body.guide-document .resource-option{padding:20px}
  body.guide-document .guide-library{padding:30px 18px}
  body.guide-document .guide-toolbar{flex-direction:row;align-items:center;gap:8px}
  body.guide-document .guide-toolbar>span{display:none}
  body.guide-document .guide-toolbar .guide-library-link{flex-basis:100%;justify-content:flex-start;min-height:30px;padding:4px 0}
}
@media print{
  body.guide-document{font-family:Arial,sans-serif}
  body.guide-document .guide-head h1,body.guide-document .guide-head h2,
  body.guide-document .guide-content h2,body.guide-document .guide-content h3,
  body.guide-document .guide-brand{font-family:Arial,sans-serif}
  body.guide-document .guide-callout>h2{font-size:11pt}
  body.guide-document .guide-contact>strong{color:#fff!important;font-size:10pt}
  body.guide-document .guide-brand small{font-size:8pt}
  body.guide-document .guide-writing-table td{height:25pt}
  body.guide-document .guide-related{font-size:9pt}
  body.guide-document .guide-related h2{font-size:10pt}
  body.guide-document .guide-related ul{margin:4pt 0;padding-left:16pt}
  body.guide-document .guide-related li{margin:3pt 0}
  body.guide-document .guide-page-footer{break-inside:avoid}
}
