/* Shared shell for the two markdown-rendering pages (playbook/, report/).
   Set --accent in the page's own <style> block before this loads to recolor
   the eyebrow/section-jump/scroll-to-top for that page (blue=playbook, teal=report).
   Requires shared/tokens.css + shared/nav.css to be loaded first. */
.doc-wrap {
  max-width: 840px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px clamp(20px, 5vw, 64px);
}
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent, var(--blue));
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent, var(--blue));
  border-radius: 1px;
  display: inline-block;
}
.section-jump {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 30px 7px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  max-width: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238695a7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.section-jump:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent, var(--blue));
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  border-color: #374252;
  color: var(--text);
}
.scroll-top-btn:focus-visible {
  outline: 2px solid var(--accent, var(--blue));
  outline-offset: 2px;
}

/* Markdown source can contain long unbroken tokens (e.g. a slash-joined parenthetical
   like "PeopleConnect (Intelius/TruthFinder/USSearch/Instant Checkmate)") that have no
   natural wrap point — without this, one long enough token forces the whole page wider
   than the viewport on narrow phones. overflow-wrap is inherited, so this one rule on
   the #content root covers every descendant (p/li/h1-h3/td/etc.) below it. */
#content {
  overflow-wrap: break-word;
}
#content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  scroll-margin-top: 80px;
}
#content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  scroll-margin-top: 80px;
}
#content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--blue);
}
#content p {
  color: var(--text);
  line-height: 1.7;
  font-size: 14.5px;
  margin: 0 0 14px;
}
#content strong {
  color: var(--text);
  font-weight: 600;
}
#content ul,
#content ol {
  color: var(--text);
  line-height: 1.75;
  font-size: 14.5px;
  padding-left: 22px;
  margin: 0 0 16px;
}
#content li {
  margin-bottom: 6px;
}
#content li::marker {
  color: var(--muted2);
}
#content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}
#content code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--teal);
}
#content a {
  color: var(--blue);
}
#content .legacy-note {
  display: block;
  font-size: 12px;
  color: var(--muted2);
  font-style: italic;
  margin-top: 4px;
}
#content .legacy-note b {
  color: var(--muted2);
  font-weight: 600;
  font-style: normal;
}
#content .verified-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--teal);
  margin-left: 6px;
}
#content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 13px;
  display: block;
  overflow-x: auto;
}
#content th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted2);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
#content td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  vertical-align: top;
}
#content tr:hover td {
  background: var(--surface2);
}

.loading {
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  text-align: center;
  padding: 60px 0;
}
