/* Off-screen Deep Dive pack host — paper print, no app chrome. */
#dd-export-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 880px;
  opacity: 0.01;
  pointer-events: none;
  z-index: 0;
  background: #ffffff;
  color: #111827;
  font-family: 'Inter', system-ui, sans-serif;
  box-sizing: border-box;
  padding: 20px 22px 28px;
}

/* Library notes painted into the same chapter tree as Deep Dive. */
#dd-export-host .dd-export-chapter {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.72;
  color: #1f2937;
}

#dd-export-host .dd-export-chapter .sec {
  margin: 0 0 4px;
}

#dd-export-host .dd-export-chapter h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

#dd-export-host .dd-export-chapter h2 {
  margin: 22px 0 10px;
  color: #0f766e;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#dd-export-host .dd-export-chapter h3 {
  margin: 16px 0 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

#dd-export-host .dd-export-chapter p {
  margin: 0 0 12px;
}

#dd-export-host .dd-export-chapter strong {
  color: #111827;
}

#dd-export-host .dd-export-chapter a {
  color: #0f766e;
  text-decoration: none;
}

#dd-export-host .dd-export-chapter ul,
#dd-export-host .dd-export-chapter ol {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

#dd-export-host .dd-export-chapter li {
  margin-bottom: 6px;
}

#dd-export-host .dd-export-chapter table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  table-layout: auto;
}

#dd-export-host .dd-export-chapter th,
#dd-export-host .dd-export-chapter td {
  padding: 5px 7px;
  border: 1px solid #d1d5db;
  text-align: left;
  vertical-align: top;
}

#dd-export-host .dd-export-chapter th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
  white-space: nowrap;
}

#dd-export-host .dd-export-chapter .lib-pdf-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* White paper: remap terminal tokens (body copy is rgba(255,255,255,.6) on dark). */
#dd-export-host.dd-export-light {
  --bg-primary: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #f4f6f8;
  --bg-hover: #eef1f4;
  --border: #d5dbe3;
  --text-primary: #111827;
  --text-secondary: #1f2937;
  --text-muted: #4b5563;
}

#dd-export-host.dd-export-light .bb-side,
#dd-export-host.dd-export-light .bb-thesis,
#dd-export-host.dd-export-light .bb-pitem {
  color: #1f2937;
}
#dd-export-host.dd-export-light .bb-eyebrow,
#dd-export-host.dd-export-light .bb-metric-lab,
#dd-export-host.dd-export-light .bb-sublabel,
#dd-export-host.dd-export-light .bb-foot,
#dd-export-host.dd-export-light .bb-ax-head .mid {
  color: #4b5563;
}
#dd-export-host.dd-export-light .bb-metric-val,
#dd-export-host.dd-export-light .bb-ax-lab,
#dd-export-host.dd-export-light .popover-section-title {
  color: #111827;
}
#dd-export-host.dd-export-light .bb-verdict,
#dd-export-host.dd-export-light .bb-axes,
#dd-export-host.dd-export-light .bb-col {
  background: #f4f6f8;
  border-color: #d5dbe3;
}
#dd-export-host.dd-export-light .bb-ax-head,
#dd-export-host.dd-export-light .bb-ax-mid {
  background: #eef1f4;
}
#dd-export-host.dd-export-light .bb-ax {
  border-bottom-color: #e5e7eb;
}
#dd-export-host.dd-export-light .bb-ax-n {
  background: #ffffff;
  color: #4b5563;
  border-color: #d5dbe3;
}
#dd-export-host.dd-export-light .bb-meter-pin {
  border-color: #ffffff;
}
#dd-export-host .bb-ax-head,
#dd-export-host .bb-ax {
  display: grid;
  grid-template-columns: 1fr 190px 1fr;
}
#dd-export-host .bb-ax-head {
  display: grid;
}

#dd-export-host.dd-export-light .cc-brief,
#dd-export-host.dd-export-light .cc-mlist,
#dd-export-host.dd-export-light .cc-callout,
#dd-export-host.dd-export-light .fa-fcard .note,
#dd-export-host.dd-export-light .fa-divrow .n,
#dd-export-host.dd-export-light .fa-secrow .sn {
  color: #1f2937;
}
#dd-export-host.dd-export-light .cc-vb,
#dd-export-host.dd-export-light .cc-kpi,
#dd-export-host.dd-export-light .cc-tile,
#dd-export-host.dd-export-light .fa-ico,
#dd-export-host.dd-export-light .fa-key,
#dd-export-host.dd-export-light .fa-divbar,
#dd-export-host.dd-export-light .fa-hbar,
#dd-export-host.dd-export-light .fa-gbar {
  background: #f4f6f8;
  border-color: #d5dbe3;
}
#dd-export-host.dd-export-light .fa-hbar .band {
  background: #cbd5e1;
}
#dd-export-host.dd-export-light .fa-gauge .mkr {
  border-color: #ffffff;
}
#dd-export-host.dd-export-light .fa-wf-seg.retained {
  background: #e5e7eb;
  color: #374151;
}
#dd-export-host.dd-export-light .cc-ms {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.08);
}
#dd-export-host .cc-grid2,
#dd-export-host .cc-er,
#dd-export-host .fa-gauges,
#dd-export-host .fa-flags {
  grid-template-columns: 1fr 1fr;
}
#dd-export-host .fa-sec,
#dd-export-host .cc-brief,
#dd-export-host .cc-mlist,
#dd-export-host .cc-er,
#dd-export-host .ei-card,
#dd-export-host .ei-quote,
#dd-export-host .ei-srow,
#dd-export-host .ei-theme,
#dd-export-host .ei-watch-item,
#dd-export-host .ei-base-p,
#dd-export-host .ei-vc-txt {
  overflow: visible;
}

/* White paper: override Earnings local dark tokens. Keep green/amber/red/cyan. */
#dd-export-host.dd-export-light .ei-root {
  --ei-bg: #ffffff;
  --ei-sf: #f4f6f8;
  --ei-sf2: #eef1f4;
  --ei-bd: #d5dbe3;
  --ei-bds: #e4e8ee;
  --ei-text: #111827;
  --ei-muted: #1f2937;
  --ei-faint: #4b5563;
  background: #ffffff;
  color: var(--ei-text);
}
#dd-export-host.dd-export-light .ei-card,
#dd-export-host.dd-export-light .ei-hdr {
  background: #f4f6f8;
}
#dd-export-host.dd-export-light .ei-theme,
#dd-export-host.dd-export-light .ei-gcard,
#dd-export-host.dd-export-light .ei-kstat {
  background: #eef1f4;
}
#dd-export-host .ei-hdr {
  grid-template-columns: 1fr 1fr 1.15fr;
  width: 100%;
  height: auto !important;
}
#dd-export-host .ei-base {
  width: 100%;
  height: auto !important;
}
#dd-export-host .ei-top-group,
#dd-export-host .ei-bottom-group,
#dd-export-host .ei-call-split,
#dd-export-host .ei-two {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
}
#dd-export-host .ei-chips,
#dd-export-host .ei-bottom-left .ei-chips {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  overflow: visible !important;
}
#dd-export-host .ei-chip {
  min-width: 0;
  overflow: visible;
}
#dd-export-host .dd-export-keep {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#dd-export-host .va-grid {
  stroke: none;
  display: none;
}
#dd-export-host.dd-export-light .va-axis,
#dd-export-host.dd-export-light .va-end {
  fill: #4b5563;
}
#dd-export-host.dd-export-light .va-mid-lab {
  fill: #111827;
}
#dd-export-host.dd-export-light .va-mid-tick {
  stroke: #111827;
}
#dd-export-host.dd-export-light .cc-brief,
#dd-export-host.dd-export-light .va-ac .mname,
#dd-export-host.dd-export-light .va-ac .mrange .base {
  color: #111827;
}
#dd-export-host .va-grid2 {
  display: flex;
  flex-direction: column;
}
#dd-export-host .va-grid2 .lft,
#dd-export-host .va-grid2 .rgt {
  padding: 0;
  border: none;
}
#dd-export-host .va-sec,
#dd-export-host .mq-sec,
#dd-export-host .mq-pcard,
#dd-export-host .mq-roster {
  overflow: visible;
}
#dd-export-host.dd-export-light .mq-root {
  color: #1f2937;
}
#dd-export-host.dd-export-light .mq-ptrack,
#dd-export-host.dd-export-light .mq-slist li,
#dd-export-host.dd-export-light .mq-sr-callout .t {
  color: #1f2937;
}
#dd-export-host.dd-export-light .mq-pcard,
#dd-export-host.dd-export-light .mq-ownrow {
  background: #f4f6f8;
  border-color: #d5dbe3;
}
#dd-export-host.dd-export-light .mq-trow .tbar.unk {
  background: #e5e7eb;
}
#dd-export-host .mq-roster {
  display: flex;
  flex-direction: column;
}

/* White paper: override Thesis local dark tokens. Keep green/amber/red/cyan. */
#dd-export-host.dd-export-light .sr-root {
  --bg: #ffffff;
  --surface: #f4f6f8;
  --surface-2: #eef1f4;
  --border: #d5dbe3;
  --border-soft: #e4e8ee;
  --text: #111827;
  --muted: #4b5563;
  --faint: #6b7280;
  background: #ffffff;
  border-color: #e5e7eb;
  color: var(--text);
  box-shadow: none;
}
#dd-export-host.dd-export-light .r52-g0{stop-color:#cbd5e1}
#dd-export-host.dd-export-light .r52-g1{stop-color:#0d9488}
#dd-export-host.dd-export-light .r52-mk{stroke:#ffffff}
#dd-export-host.dd-export-light .rng .cu {
  border-color: #ffffff;
}
#dd-export-host.dd-export-light .sr-feed,
#dd-export-host.dd-export-light .cardv .cc,
#dd-export-host.dd-export-light .tag.n {
  background: #f3f4f6;
}
#dd-export-host.dd-export-light .eg-seg.n {
  background: repeating-linear-gradient(135deg, rgba(17, 24, 39, 0.05) 0 4px, transparent 4px 8px);
  border-top-color: rgba(17, 24, 39, 0.14);
}
#dd-export-host.dd-export-light .eg-lv {
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}
#dd-export-host.dd-export-light .eg-toggle,
#dd-export-host.dd-export-light .nav {
  display: none;
}

#dd-export-host .eg-pill,
#dd-export-host .cc-root,
#dd-export-host .ei-root,
#dd-export-host .ta-ai-wrap,
#dd-export-host .sr-root,
#dd-export-host .bb-export-root {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Host is 880px; keep desktop Thesis layout, not the 2-col tablet wrap. */
#dd-export-host .eg-pillars {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
#dd-export-host .eg-verdict {
  flex-wrap: nowrap;
}
#dd-export-host .eg-verdict-word {
  white-space: nowrap;
  font-size: 16px;
}
#dd-export-host .eg-levels {
  padding: 4px 5px;
  gap: 3px;
}
#dd-export-host .eg-para {
  grid-template-columns: 132px minmax(0, 1fr);
}
#dd-export-host .eg-dd {
  grid-template-columns: 112px minmax(0, 1fr) 84px 14px;
}

.dd-export-masthead {
  padding: 4px 0 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.dd-export-mast-k {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.02em;
}

.dd-export-mast-s {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

.dd-export-mast-brand {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.dd-export-chap-h {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
  font-weight: 700;
  margin: 8px 0 14px;
}

.download-pack-btn {
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
}

button.download-pack-btn:hover {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.18);
  color: #5eead4;
}

button.download-pack-btn:disabled,
button.download-pack-btn.is-busy {
  opacity: 1;
  cursor: wait;
  box-shadow: none;
}

@media (max-width: 768px) {
  .download-pack-btn {
    padding: 7px 10px;
    margin-right: 6px;
    gap: 0;
  }
  .download-pack-btn [data-dd-label] {
    display: none;
  }
}

.dd-dl-spin {
  animation: dd-spin 0.7s linear infinite;
  transform-origin: center;
}

@keyframes dd-spin {
  to { transform: rotate(360deg); }
}
