/* ============================================================
   BRSG Compliance — section overrides on top of /_shared/styles.css
   Adds typography polish for long-form markdown (regulatory maps,
   audits, standards) and structural styles for program landings.
   ============================================================ */

/* ─── Long-form markdown body (rendered .md pages) ───────── */
.md-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 48px;
  font-size: 16px;
  line-height: 1.7;
}
.md-body h1 { font-size: 36px; margin-top: 0; margin-bottom: 24px; }
.md-body h2 {
  font-size: 26px;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brsg-blue-soft);
}
.md-body h3 { font-size: 20px; margin-top: 36px; margin-bottom: 12px; color: var(--brsg-blue); }
.md-body h4 {
  font-size: 13px;
  margin-top: 28px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brsg-navy);
  font-weight: 700;
}
.md-body p { max-width: 72ch; margin-bottom: 18px; }
.md-body ul, .md-body ol { margin: 0 0 18px 28px; }
.md-body li { margin-bottom: 6px; }
.md-body li > p { margin-bottom: 8px; }
.md-body li > ul, .md-body li > ol { margin-top: 4px; margin-bottom: 8px; }
.md-body strong { color: var(--brsg-navy); font-weight: 700; }
.md-body em { color: var(--brsg-text); font-style: italic; }
.md-body a {
  color: var(--brsg-blue);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}
.md-body a:hover { color: var(--brsg-navy); }
.md-body hr { border: none; border-top: 1px solid var(--brsg-border); margin: 48px 0; }
.md-body blockquote {
  border-left: 4px solid var(--brsg-gold);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--brsg-blue-soft);
  border-radius: 0 4px 4px 0;
}
.md-body blockquote p:last-child { margin-bottom: 0; }
.md-body code {
  font-family: "SF Mono", "Fira Mono", "Consolas", monospace;
  background: var(--brsg-blue-soft);
  color: var(--brsg-navy);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.md-body pre {
  background: var(--brsg-navy);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 24px 0;
  overflow-x: auto;
}
.md-body pre code {
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  padding: 0;
}
.md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(7,53,103,0.05);
}
.md-body th {
  background: var(--brsg-navy);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-transform: uppercase;
}
.md-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--brsg-border);
  vertical-align: top;
}
.md-body tr:last-child td { border-bottom: none; }
.md-body tr:nth-child(even) td { background: var(--brsg-ivory); }

/* ─── Compliance card grid (action tracker) ──────────────── */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.compliance-card {
  background: white;
  border: 1px solid var(--brsg-border);
  border-left: 4px solid var(--brsg-blue);
  border-radius: 4px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(7,53,103,0.04);
}
.compliance-card.card-p0 { border-left-color: var(--brsg-alert); }
.compliance-card.card-p1 { border-left-color: var(--brsg-warn); }
.compliance-card.card-p2 { border-left-color: var(--brsg-blue); }
.compliance-card.card-p3 { border-left-color: var(--brsg-border); }

.sev {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sev-p0 { background: #FCE4E4; color: var(--brsg-alert); }
.sev-p1 { background: #FFF4DC; color: var(--brsg-warn); }
.sev-p2 { background: var(--brsg-blue-soft); color: var(--brsg-blue); }
.sev-p3 { background: #ECECEC; color: var(--brsg-text-muted); }

/* ─── Intro callout ──────────────────────────────────────── */
.intro-callout {
  background: white;
  border-left: 4px solid var(--brsg-gold);
  padding: 28px 32px;
  margin: 32px 0;
  box-shadow: 0 1px 3px rgba(7,53,103,0.06);
  border-radius: 0 4px 4px 0;
}

/* ─── Version / testing bar ──────────────────────────────── */
.standard-bar {
  background: var(--brsg-navy-deep);
  color: #cfe0ff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  padding: 9px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.standard-bar a { color: var(--brsg-gold); border: none; font-weight: 600; }
.standard-bar a:hover { color: var(--brsg-gold-hover); text-decoration: underline; }
.standard-bar .sb-links { display: flex; flex-wrap: wrap; gap: 14px; }
.standard-bar .sb-current { opacity: 0.6; font-weight: 500; }

/* ─── Disclaimer ribbon ──────────────────────────────────── */
.standard-ribbon {
  background: var(--brsg-navy);
  color: #cfe0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-bottom: 3px solid var(--brsg-gold);
}
.standard-ribbon svg { width: 16px; height: 16px; flex: none; color: var(--brsg-gold); }
.standard-ribbon strong { color: #fff; }

/* Landing-page variant: rounded card, sits inside a section */
.standard-ribbon.inline {
  border-radius: 6px;
  border-bottom: none;
  margin: 0 0 8px 0;
  justify-content: flex-start;
}

/* Print-only document meta (screen-hidden; appears in the PDF header) */
.print-meta { display: none; }

/* ─── Print / Save-as-PDF stylesheet ─────────────────────── */
@media print {
  .portal-nav, .standard-bar, .standard-ribbon, .portal-footer { display: none !important; }
  body { background: #fff !important; }
  .cover {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    padding: 0 0 16px 0 !important;
    overflow: visible;
  }
  .cover::before, .cover::after { display: none !important; }
  .cover h1 { color: #000 !important; }
  .cover-eyebrow { color: #666 !important; }
  .print-meta {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #555;
    border-top: 1px solid #ddd;
    padding-top: 8px;
  }
  .md-body { padding: 16px 0 0 0 !important; max-width: 100% !important; }
  .md-body a { color: #000 !important; text-decoration: underline; }
  .md-body h2 { border-bottom-color: #ccc !important; }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .md-body { padding: 40px 24px; }
  .compliance-grid { grid-template-columns: 1fr; }
  .standard-bar { font-size: 11.5px; gap: 6px 12px; }
}
