/* Socionics Lab · Editorial Report Reader & Magazine Print/PDF Export
 * Cohesive with Socionics Lab architectural blueprint palette (#EDF6FD canvas, #FDFDFB paper, #10263A ink).
 * Strict 2-font discipline (Lilita One display + Avenir Next / Inter body), 3-step body typography scale,
 * and publication-grade @media print pagination.
 */

:root {
  --rep-canvas: #EDF6FD;
  --rep-paper: #FDFDFB;
  --rep-ink: #10263A;
  --rep-body: #2A3F52;
  --rep-muted: #587085;
  --rep-line: rgba(16, 38, 58, 0.11);
  --rep-line-strong: rgba(16, 38, 58, 0.20);
  --rep-gold: #D99518;
  --rep-gold-bg: #FFFBF0;
  --rep-coral: #C95244;
  --rep-coral-bg: #FFF5F3;
  --rep-mint: #1B875B;
  --rep-mint-bg: #F2FBF6;
  --rep-blue: #82BBE6;
  --rep-blue-bg: #F1F8FE;
  --rep-purple: #E39BC0;
  --rep-purple-bg: #FDF5F9;

  --rep-text-h2: 22px;
  --rep-text-body: 16px;
  --rep-text-sm: 13.5px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--rep-canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #E2F1FC 0%, #EFF7FD 260px, #EDF6FD 100%);
  color: var(--rep-body);
  font-family: "Avenir Next", Avenir, "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--rep-text-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: #1968A8; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #0F4B7D; }

/* ---------- Sticky Utility Bar ---------- */
.report-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(237, 246, 253, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rep-line);
}

.report-topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.report-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.report-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--rep-ink);
  font-size: var(--rep-text-sm);
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid rgba(16, 38, 58, 0.14);
  box-shadow: 0 3px 0 rgba(16, 38, 58, 0.08);
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease;
  white-space: nowrap;
}

.report-back:hover {
  background: #F6FAFE;
  color: var(--rep-ink);
  transform: translateY(-1px);
}

.report-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--rep-ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.report-brand-lab {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 7px;
  background: #FFC94D;
  color: #10263A;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 0 #D99518;
}

.report-nav-title {
  color: var(--rep-muted);
  font-size: var(--rep-text-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.report-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1.5px solid #E2B83C;
  background: linear-gradient(180deg, #FFE89E 0%, #FFD659 100%);
  color: #10263A;
  font-family: inherit;
  font-size: var(--rep-text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 0 #D4A62A;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), filter 150ms ease;
  white-space: nowrap;
}

.report-pdf-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.report-pdf-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #D4A62A;
}

.report-topbar .langPill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #D6EEFF;
  color: #10263A;
  font-size: var(--rep-text-sm);
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid rgba(134, 183, 216, 0.7);
  box-shadow: 0 4px 0 #86B7D8;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), background-color 150ms ease;
}

.report-topbar .langPill:hover {
  background: #E8F6FF;
  color: #10263A;
  transform: translateY(-1px);
}

/* ---------- Preview / Locale Notice Bar ---------- */
.report-main-col {
  min-width: 0;
}

.report-notice-bar {
  margin: 0 0 16px;
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--rep-line);
  color: var(--rep-muted);
  font-size: var(--rep-text-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.report-notice-bar strong { color: var(--rep-ink); }

.report-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--rep-text-sm);
}

.report-mode-switch select {
  font-family: inherit;
  font-size: var(--rep-text-sm);
  font-weight: 600;
  color: var(--rep-ink);
  background: #FFFFFF;
  border: 1px solid var(--rep-line-strong);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

/* ---------- Stage Layout (Optional Left TOC + Paper Sheet) ---------- */
.report-stage {
  max-width: 1120px;
  margin: 22px auto 72px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 210px minmax(0, 820px);
  gap: 36px;
  align-items: start;
  justify-content: center;
}

.report-stage.is-gated {
  grid-template-columns: minmax(0, 820px);
}

.report-toc {
  position: sticky;
  top: 84px;
  padding-top: 12px;
}

.report-toc-label {
  margin: 0 0 10px;
  font-size: var(--rep-text-sm);
  font-weight: 700;
  color: var(--rep-ink);
}

.report-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1.5px solid var(--rep-line);
}

.report-toc li { margin: 0; }

.report-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -1.5px;
  border-left: 2px solid transparent;
  font-size: var(--rep-text-sm);
  line-height: 1.4;
  color: var(--rep-muted);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease;
}

.report-toc a:hover,
.report-toc a.is-active {
  color: var(--rep-ink);
  border-left-color: var(--rep-ink);
  font-weight: 600;
}

/* ---------- The Architectural Paper Dossier Sheet ---------- */
.report-sheet {
  background: var(--rep-paper);
  border: 1px solid var(--rep-line);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(16, 38, 58, 0.08), 0 2px 8px rgba(16, 38, 58, 0.04);
  padding: 54px 62px 64px;
  position: relative;
}

.report-sheet.is-gated,
.report-sheet:has(> .report-gate) {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 20px 0 40px;
}

.report-loading {
  padding: 64px 0;
  text-align: center;
  color: var(--rep-muted);
  font-size: var(--rep-text-body);
}

/* ---------- Cover Header ---------- */
.rep-cover {
  padding-bottom: 30px;
  border-bottom: 1.5px solid var(--rep-line-strong);
  margin-bottom: 36px;
}

.rep-cover-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.rep-cover h1 {
  margin: 0 0 8px;
  font-family: "Lilita One", "Avenir Next", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 4.3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--rep-ink);
}

.rep-title-sep {
  font-family: "Avenir Next", Inter, sans-serif;
  font-weight: 600;
  opacity: 0.36;
  margin: 0 0.24em;
}

html[lang="vi"] .rep-cover h1,
html[lang="vi"] .rep-section h2,
html[lang="vi"] .rep-cover-pct {
  font-weight: 800;
  letter-spacing: -0.025em;
}

.rep-cover-sub {
  margin: 0 0 18px;
  font-size: var(--rep-text-body);
  color: var(--rep-muted);
  max-width: 60ch;
}

.rep-cover-score {
  flex-shrink: 0;
  text-align: right;
  padding-top: 4px;
}

.rep-cover-pct {
  display: block;
  font-family: "Lilita One", "Avenir Next", sans-serif;
  font-size: 38px;
  line-height: 1;
  color: var(--rep-ink);
}

.rep-cover-rel {
  display: block;
  margin-top: 4px;
  font-size: var(--rep-text-sm);
  font-weight: 700;
  color: var(--rep-muted);
}

.rep-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 18px 0 0;
  margin: 0;
  border-top: 1px solid var(--rep-line);
}

.rep-meta-grid.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.rep-meta-grid dt {
  font-size: var(--rep-text-sm);
  color: var(--rep-muted);
  margin: 0 0 2px;
}

.rep-meta-grid dd {
  margin: 0;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
}

.rep-pair-card-col {
  padding-left: 14px;
  border-left: 3px solid var(--rep-blue);
}

.rep-pair-card-col.is-b {
  border-left-color: var(--rep-purple);
}

.rep-pair-card-name {
  margin: 0 0 4px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
}

.rep-pair-card-line {
  margin: 2px 0;
  font-size: var(--rep-text-sm);
  color: var(--rep-body);
}

.rep-provenance {
  margin: 18px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #F4F8FC;
  border: 1px solid var(--rep-line);
  font-size: var(--rep-text-sm);
  color: var(--rep-muted);
}

/* ---------- Vector Data Charts ---------- */
.rep-chart-block {
  margin: 28px 0 36px;
  padding: 20px 22px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-chart-block.is-pair-el {
  padding: 22px 24px;
}

.rep-el-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(16, 38, 58, 0.08);
}

.rep-el-top .rep-chart-title {
  margin: 0;
}

.rep-el-legend {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: #2B4257;
}

.rep-el-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rep-el-legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.rep-el-list {
  display: flex;
  flex-direction: column;
}

.rep-el-row {
  display: grid;
  grid-template-columns: minmax(0, 185px) 230px 104px;
  justify-content: space-between;
  align-items: center;
  gap: 8px 32px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(16, 38, 58, 0.07);
}

.rep-el-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rep-el-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.rep-el-code {
  font-size: 13.5px;
  font-weight: 800;
  color: #10263A;
  line-height: 1.2;
}

.rep-el-name {
  font-size: 12px;
  color: #5B7082;
  line-height: 1.3;
}

.rep-el-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rep-el-line {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
}

.rep-el-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.rep-el-track {
  height: 6px;
  border-radius: 999px;
  background: #F1F5F9;
  overflow: hidden;
}

.rep-el-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.rep-el-num {
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: #10263A;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.rep-el-num.is-muted {
  color: #6B8092;
  font-weight: 600;
}

.rep-el-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  justify-self: start;
}

.rep-el-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0 0 0 9px;
  border-left: 2px solid transparent;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.rep-el-who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #10263A;
  font-weight: 700;
}

.rep-el-who i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.rep-el-tag.is-ego {
  border-left-color: #68C49E;
}

.rep-el-tag.is-ego .rep-el-role {
  color: #1A7554;
}

.rep-el-tag.is-polr {
  border-left-color: #E79384;
}

.rep-el-tag.is-polr .rep-el-role {
  color: #C24933;
}

.rep-chart-title {
  margin: 0 0 12px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rep-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--rep-text-sm);
  font-weight: 600;
  color: var(--rep-muted);
}

.rep-chart-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.rep-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.rep-chart-note {
  margin: 10px 0 0;
  font-size: var(--rep-text-sm);
  color: var(--rep-muted);
}

/* ---------- Editorial Chapters ---------- */
.rep-section {
  margin: 0 0 42px;
  padding-top: 28px;
  border-top: 1px solid var(--rep-line);
}

.rep-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.rep-section h2 {
  margin: 0 0 16px;
  font-family: "Lilita One", "Avenir Next", sans-serif;
  font-weight: 400;
  font-size: var(--rep-text-h2);
  line-height: 1.25;
  color: var(--rep-ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.rep-sec-accent {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  transform: translateY(-2px);
}

.rep-sec-accent.is-gold { background: #F5B83A; }
.rep-sec-accent.is-coral { background: #F06464; }
.rep-sec-accent.is-mint { background: #34BE70; }
.rep-sec-accent.is-blue { background: #38AEE6; }

.rep-section h3 {
  margin: 26px 0 10px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
}

.rep-section p {
  margin: 0 0 14px;
  max-width: 65ch;
  color: var(--rep-body);
}

.rep-section ul,
.rep-section ol {
  margin: 0 0 16px;
  padding-left: 20px;
  max-width: 65ch;
}

.rep-section li {
  margin-bottom: 10px;
  color: var(--rep-body);
}

.rep-section li strong {
  color: var(--rep-ink);
}

/* ---------- Structured Editorial Callouts & Lists ---------- */
.rep-callout {
  margin: 14px 0 18px;
  padding: 15px 19px;
  border-radius: 12px;
  border: 1px solid rgba(217, 149, 24, 0.20);
  background: var(--rep-gold-bg);
}

.rep-callout.is-coral {
  border-color: rgba(231, 147, 132, 0.30);
  background: #FFF6F4;
}

.rep-callout.is-mint {
  border-color: rgba(104, 196, 158, 0.30);
  background: var(--rep-mint-bg);
}

.rep-callout.is-blue {
  border-color: rgba(130, 187, 230, 0.34);
  background: var(--rep-blue-bg);
}

.rep-callout p {
  margin: 0;
  max-width: none;
}

.rep-callout strong {
  color: var(--rep-ink);
}

.rep-hl {
  background: #FEF3C7;
  color: var(--rep-ink);
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.rep-hl.is-mint {
  background: #E2F7EC;
}

.rep-hl.is-coral {
  background: #FDECE9;
}

.rep-hl.is-blue {
  background: #E5F3FD;
}

.rep-item-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 14px 0 24px;
}

.rep-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 0;
}

.rep-item-list.is-dotted .rep-item {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
}

.rep-item-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 8px;
  background: #EEF6FD;
  color: #1D5E8C;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.rep-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 9px;
  background: #68C49E;
}

.rep-item-list.is-coral .rep-item-dot {
  background: #E79384;
}

.rep-item-body {
  min-width: 0;
}

.rep-item-title {
  margin: 0 0 5px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
  line-height: 1.4;
}

.rep-item p {
  margin: 0;
  max-width: 62ch;
}

.rep-env-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 10px;
}

.rep-env-col {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--rep-line);
}

.rep-env-col.is-good {
  background: var(--rep-mint-bg);
  border-color: rgba(27, 135, 91, 0.22);
}

.rep-env-col.is-drain {
  background: var(--rep-coral-bg);
  border-color: rgba(201, 82, 68, 0.22);
}

.rep-env-col h4 {
  margin: 0 0 8px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
}

.rep-env-col p {
  margin: 0;
  max-width: none;
}

/* ---------- Personal Career Tracks & Shadow Growth Path ---------- */
.rep-career-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}

.rep-career-card {
  padding: 15px 17px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-career-card h4 {
  margin: 0 0 6px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
  line-height: 1.38;
}

.rep-career-card p {
  margin: 0;
  font-size: var(--rep-text-sm);
  line-height: 1.58;
  max-width: none;
}

.rep-growth-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 14px 0 10px;
}

.rep-growth-step {
  padding: 16px 19px;
  border-radius: 13px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-growth-phase {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rep-mint-bg);
  color: #156B47;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rep-growth-focus {
  margin: 0 0 6px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
  line-height: 1.4;
}

.rep-growth-step p {
  margin: 0;
  max-width: none;
}

.rep-cue-quote {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--rep-blue-bg);
  color: var(--rep-ink);
  font-size: var(--rep-text-sm);
  font-style: italic;
  line-height: 1.55;
}

/* ---------- Pair Top Friction Loops (3 Complete Closed Loops) ---------- */
.rep-loops-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 14px 0 24px;
}

.rep-loop-card {
  padding: 20px 22px;
  border-radius: 15px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-loop-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.rep-loop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #FDECE9;
  color: var(--rep-coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.rep-loop-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--rep-ink);
  line-height: 1.35;
}

.rep-loop-trigger {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #FFF7F5;
  border: 1px solid rgba(201, 82, 68, 0.16);
  font-size: var(--rep-text-sm);
  line-height: 1.58;
  color: var(--rep-body);
}

.rep-loop-trigger strong {
  color: var(--rep-coral);
}

.rep-os-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.rep-os-box {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--rep-blue-bg);
  border: 1px solid rgba(130, 187, 230, 0.28);
}

.rep-os-box.is-b {
  background: var(--rep-purple-bg);
  border-color: rgba(227, 155, 192, 0.30);
}

.rep-os-who {
  margin: 0 0 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rep-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rep-os-who i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}

.rep-os-text {
  margin: 0 !important;
  font-size: var(--rep-text-sm);
  font-style: italic;
  line-height: 1.55;
  color: var(--rep-ink) !important;
  max-width: none !important;
}

.rep-loop-surface {
  margin: 0 0 14px !important;
  font-size: var(--rep-text-sm);
  color: var(--rep-muted) !important;
  max-width: none !important;
}

.rep-loop-surface strong {
  color: var(--rep-ink);
}

.rep-loop-scripts-label {
  margin: 0 0 8px !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rep-muted) !important;
}

.rep-loop-card .rep-scripts-grid {
  margin: 0;
  gap: 12px;
}

.rep-loop-card .rep-script {
  padding: 13px 15px;
  border-radius: 11px;
  background: #FAFCFE;
}

.rep-loop-card .rep-script blockquote {
  font-size: var(--rep-text-sm);
  padding: 10px 12px;
}

/* ---------- Pair Playbook For A & B ---------- */
.rep-playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0 0;
}

.rep-playbook-col {
  padding: 20px 22px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-playbook-col h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rep-line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rep-playbook-col h3 i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}

.rep-playbook-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rep-playbook-item {
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(16, 38, 58, 0.07);
}

.rep-playbook-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rep-playbook-tag {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EEF6FD;
  color: #1D5E8C;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rep-playbook-col.is-b .rep-playbook-tag {
  background: #FDF1F7;
  color: #943A69;
}

.rep-playbook-title {
  margin: 0 0 4px !important;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink) !important;
  line-height: 1.38;
}

.rep-playbook-action {
  margin: 0 !important;
  font-size: var(--rep-text-sm);
  line-height: 1.58;
  color: var(--rep-body) !important;
  max-width: none !important;
}

/* ---------- Tables (Escalation & Relationships) ---------- */
.rep-table-wrap {
  margin: 16px 0 24px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--rep-line);
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  font-size: var(--rep-text-sm);
  line-height: 1.55;
}

.rep-table th {
  text-align: left;
  padding: 11px 14px;
  background: #F2F7FC;
  color: var(--rep-ink);
  font-weight: 700;
  border-bottom: 1.5px solid var(--rep-line-strong);
}

.rep-table td {
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--rep-line);
  color: var(--rep-body);
}

.rep-table tr:last-child td {
  border-bottom: 0;
}

.rep-table td:first-child {
  font-weight: 700;
  color: var(--rep-ink);
  white-space: nowrap;
}

/* ---------- Spoken Repair Scripts ---------- */
.rep-scripts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}

.rep-script {
  padding: 18px 20px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-script-who {
  margin: 0 0 4px;
  font-size: var(--rep-text-body);
  font-weight: 700;
  color: var(--rep-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rep-script-who i,
.rep-cheat-col h3 i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}

.rep-script-goal {
  margin: 0 0 10px;
  font-size: var(--rep-text-sm);
  color: var(--rep-muted);
}

.rep-script blockquote {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--rep-blue-bg);
  color: var(--rep-ink);
  font-size: var(--rep-text-body);
  font-style: italic;
  line-height: 1.6;
}

.rep-script.is-b blockquote {
  background: var(--rep-purple-bg);
}

/* ---------- 30-Second Cheat Sheet Appendix ---------- */
.rep-cheat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 16px 0 0;
}

.rep-cheat-col {
  padding: 20px 22px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid var(--rep-line);
}

.rep-cheat-col h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rep-line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rep-cheat-col ol {
  margin: 0;
  padding-left: 18px;
}

.rep-cheat-col li {
  margin-bottom: 12px;
}

.rep-cheat-col li:last-child {
  margin-bottom: 0;
}

.rep-doc-footer {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--rep-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--rep-text-sm);
  color: var(--rep-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .report-stage {
    grid-template-columns: minmax(0, 820px);
  }
  .report-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .report-topbar-inner {
    padding: 10px 14px;
    gap: 8px;
  }
  .report-brand { display: none; }
  .report-nav-title { display: none; }
  .report-stage {
    padding: 0 12px;
    margin: 14px auto 48px;
  }
  .report-notice-bar {
    margin: 12px 12px 0;
  }
  .report-sheet {
    padding: 26px 20px 34px;
    border-radius: 16px;
  }
  .rep-cover-top {
    flex-direction: column;
    gap: 10px;
  }
  .rep-cover-score {
    text-align: left;
    padding-top: 0;
  }
  .rep-meta-grid,
  .rep-meta-grid.is-pair,
  .rep-env-grid,
  .rep-career-grid,
  .rep-os-grid,
  .rep-scripts-grid,
  .rep-cheat-grid,
  .rep-playbook-grid {
    grid-template-columns: 1fr;
  }
  .rep-table td:first-child {
    white-space: normal;
  }
  .rep-el-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }
  .rep-el-title { grid-column: 1; grid-row: 1; }
  .rep-el-tags { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
  .rep-el-bars { grid-column: 1 / -1; grid-row: 2; max-width: 240px; }
}

@media (max-width: 480px) {
  .report-topbar-inner {
    padding: 9px 12px;
    gap: 8px;
  }
  .report-nav-left {
    flex: 1 1 auto;
    min-width: 0;
  }
  .report-back {
    max-width: 100%;
    padding: 7px 10px;
    font-size: 12.5px;
    overflow: hidden;
  }
  .report-back span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .report-nav-right {
    gap: 7px;
  }
  .report-pdf-btn {
    height: 38px;
    padding: 0 12px;
    font-size: 12.5px;
    gap: 6px;
  }
  .report-topbar .langPill {
    width: 38px;
    height: 38px;
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Magazine-Grade Print / PDF Export ---------- */
@page {
  size: A4;
  margin: 15mm 14mm 17mm 14mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #FFFFFF !important;
    font-size: 11pt;
    line-height: 1.58;
    color: #1A2D3E;
  }

  .report-topbar,
  .report-toc,
  .report-notice-bar,
  .no-print {
    display: none !important;
  }

  .report-stage {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .report-sheet {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    padding: 0 !important;
  }

  .rep-cover {
    margin-bottom: 18pt;
    padding-bottom: 14pt;
  }

  .rep-cover-top {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }

  .rep-cover-score {
    text-align: right !important;
  }

  .rep-cover h1 {
    font-size: 24pt;
  }

  .rep-section {
    margin-bottom: 18pt;
    padding-top: 14pt;
  }

  .rep-section h2 {
    font-size: 15pt;
    break-after: avoid;
    page-break-after: avoid;
  }

  .rep-section h3,
  .rep-section h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .rep-section p,
  .rep-section li {
    max-width: none !important;
    orphans: 3;
    widows: 3;
  }

  .rep-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10pt 14pt !important;
  }

  .rep-meta-grid.is-pair,
  .rep-env-grid,
  .rep-career-grid,
  .rep-os-grid,
  .rep-scripts-grid,
  .rep-cheat-grid,
  .rep-playbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12pt !important;
  }

  .rep-el-row {
    grid-template-columns: minmax(0, 165px) 205px 96px !important;
    justify-content: space-between !important;
    gap: 6pt 28pt !important;
    padding: 7pt 0 !important;
  }
  .rep-el-title { grid-column: auto !important; grid-row: auto !important; }
  .rep-el-bars { grid-column: auto !important; grid-row: auto !important; max-width: none !important; }
  .rep-el-tags { grid-column: auto !important; grid-row: auto !important; justify-self: start !important; align-self: center !important; }

  .rep-chart-block,
  .rep-callout,
  .rep-item,
  .rep-env-grid,
  .rep-career-card,
  .rep-growth-step,
  .rep-loop-card,
  .rep-script,
  .rep-cheat-col,
  .rep-playbook-item,
  .rep-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .rep-table-wrap {
    overflow: visible !important;
  }

  .rep-print-break {
    break-before: page;
    page-break-before: always;
  }

  a {
    color: #10263A !important;
    text-decoration: none !important;
  }
}

/* ---------- Access Gate Card (Unpaid / Restore) ---------- */
.report-gate {
  max-width: 540px;
  margin: 24px auto;
  padding: 28px 30px;
  border-radius: 20px;
  background: #0C1421;
  background-image: radial-gradient(circle, rgba(164, 183, 205, 0.16) 0.8px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid #303B49;
  color: #F2F6F8;
  box-shadow: 0 18px 44px rgba(16, 38, 58, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-gate h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  color: #F7F9FC;
}

.report-gate p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #BAC6D3;
}

.report-gate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 11px;
  background: linear-gradient(110deg, #FFC524, #F5A300);
  color: #0C1421;
  border: 1px solid #FFD766;
  box-shadow: 0 3px 0 #A96B08;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  width: fit-content;
}

.report-gate-cta:hover {
  color: #0C1421;
  filter: brightness(1.06);
}

.report-restore-wrap {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(164, 183, 205, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-restore-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #9FDCFF;
}

.report-restore-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-restore-form input {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #38516B;
  background: #132133;
  color: #F2F6F8;
  font-family: inherit;
  font-size: 14px;
}

.report-restore-form button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(208, 230, 248, 0.34);
  background: #1C2E42;
  color: #F4F8FC;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.report-restore-form button:hover {
  background: #253D56;
}

.report-restore-msg {
  font-size: 13.5px;
  color: #6EF0C6;
}

.report-restore-msg a {
  color: #9FDCFF;
}
