.cpf-wrap { max-width: 920px; margin: 0 auto; padding: 0 1rem; }


/* Hero */
.cpf-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 48px;
}
.cpf-hero-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 600;
  color: #6366f1; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.cpf-hero h1 {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 30px; font-weight: 700; line-height: 1.2;
  color: #ffffff; margin-bottom: 14px;
}
.cpf-hero p { font-size: 15px; color: #a1a1aa; line-height: 1.65; }
.cpf-hero-stats { display: flex; gap: 32px; margin-top: 28px; flex-wrap: wrap; }
.cpf-stat-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px; font-weight: 600; color: #ffffff;
}
.cpf-stat-lbl { font-size: 11px; color: #71717a; margin-top: 2px; }

/* Section layout */
.cpf-section { margin-bottom: 72px; scroll-margin-top: 80px; }
.cpf-section-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 600; color: #71717a;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px;
}
.cpf-section-h2 {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 22px; font-weight: 600; color: #ffffff; margin-bottom: 10px;
}
.cpf-section-desc { font-size: 14px; color: #a1a1aa; line-height: 1.65; margin-bottom: 32px; }
.cpf-divider { height: 1px; background: rgba(255,255,255,0.06); margin-bottom: 32px; }

/* Prose blocks (sections 1, 3) */
.cpf-prose {
  font-size: 15px; color: #d4d4d8; line-height: 1.8;
}
.cpf-prose p { margin-bottom: 18px; }
.cpf-prose a { color: #818cf8; text-decoration: none; }
.cpf-prose a:hover { text-decoration: underline; }
.cpf-prose strong { color: #ffffff; font-weight: 600; }

/* Paper reference pills */
.cpf-paper-refs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.cpf-paper-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
  border-radius: 6px; padding: 8px 14px;
  font-size: 13px; color: #a5b4fc; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.cpf-paper-pill:hover { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); }
.cpf-paper-pill svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Table filters */
.cpf-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px;
}
.cpf-search {
  flex: 1; min-width: 200px;
  background: rgba(24,24,27,0.6); border: 1px solid #3f3f46;
  border-radius: 6px; padding: 8px 12px;
  font-size: 13px; color: #d4d4d8; outline: none;
  transition: border-color .15s;
}
.cpf-search:focus { border-color: #6366f1; }
.cpf-search::placeholder { color: #52525b; }
.cpf-select {
  background: rgba(24,24,27,0.6); border: 1px solid #3f3f46;
  border-radius: 6px; padding: 8px 10px;
  font-size: 13px; color: #d4d4d8; outline: none; cursor: pointer;
  transition: border-color .15s;
}
.cpf-select:focus { border-color: #6366f1; }
.cpf-filter-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px; color: #52525b; white-space: nowrap;
}

/* Mapping table */
.cpf-table-wrap {
  border: 1px solid #27272a; border-radius: 10px; overflow: hidden;
  overflow-x: auto;
}
.cpf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cpf-table thead tr { background: rgba(24,24,27,0.9); }
.cpf-table thead th {
  padding: 10px 14px; text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 600; color: #52525b;
  letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid #27272a; white-space: nowrap;
}
.cpf-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background .1s; }
.cpf-table tbody tr:last-child { border-bottom: none; }
.cpf-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.cpf-table tbody td { padding: 10px 14px; color: #d4d4d8; vertical-align: top; line-height: 1.5; }
.cpf-table .td-metric {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px; color: #a5b4fc; white-space: nowrap; font-weight: 600;
}
.cpf-table .td-cpf {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px; color: #6ee7b7; white-space: nowrap;
}
.cpf-table .td-cat { font-size: 11px; color: #71717a; }

/* Group header rows */
.cpf-table .group-header td {
  background: rgba(99,102,241,0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 700; color: #6366f1;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 14px; border-bottom: 1px solid rgba(99,102,241,0.15);
}

/* Uncertainty marker */
.cpf-uncertain {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(234,179,8,0.15); border: 1px solid rgba(234,179,8,0.3);
  font-size: 9px; color: #eab308; cursor: help;
  margin-left: 4px; vertical-align: middle; flex-shrink: 0;
}

/* Worked example */
.cpf-trace-step {
  background: rgba(24,24,27,0.5); border: 1px solid #27272a;
  border-radius: 8px; padding: 18px 20px; margin-bottom: 12px;
}
.cpf-trace-step-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 600; color: #6366f1;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px;
}
.cpf-trace-step p { font-size: 14px; color: #a1a1aa; line-height: 1.6; margin: 0; }
.cpf-trace-arrow {
  text-align: center; color: #3f3f46; font-size: 18px;
  margin: 4px 0; user-select: none;
}
.cpf-alert-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px; font-weight: 600;
}
.badge-yellow { background: rgba(234,179,8,.12); color: #eab308; }
.badge-red    { background: rgba(239,68,68,.12);  color: #ef4444; }
.badge-green  { background: rgba(34,197,94,.12);  color: #22c55e; }
.badge-indigo { background: rgba(99,102,241,.12); color: #818cf8; }

/* ── Light mode: WCAG AA-compliant badge colors ── */
html.psa-light .badge-yellow { background: rgba(161,98,7,.1);    color: #92400e; }
html.psa-light .badge-red    { background: rgba(185,28,28,.1);   color: #b91c1c; }
html.psa-light .badge-green  { background: rgba(22,163,74,.1);   color: #15803d; }
html.psa-light .badge-indigo { background: rgba(79,70,229,.1);   color: #4338ca; }

/* Hidden rows (filtered out) */
.cpf-row-hidden { display: none; }

/* ── Indicator matrix 10×10 ──────────────────────────────────────────────── */
.c3-ind-matrix {
  border-collapse: separate;
  border-spacing: 5px;
  width: 100%;
  font-size: .75rem;
  font-family: monospace;
  table-layout: fixed;
}
.c3-ind-matrix th {
  font-size: .65rem;
  color: #71717a;
  font-weight: 700;
  text-align: center;
  padding: 4px 2px;
  cursor: default;
}
.c3-ind-matrix th:first-child { width: 58px; text-align: left; padding-left: .3rem; }
.c3-ind-matrix th.c3-im-col-hd:hover { color: #a1a1aa; }
.c3-im-cat-lbl {
  font-size: .65rem;
  font-weight: 700;
  color: #71717a;
  white-space: nowrap;
  padding: 4px .4rem;
  cursor: default;
}
.c3-im-cat-lbl:hover { color: #a1a1aa; }
.c3-im-cell {
  text-align: center;
  height: 28px;
  padding: 0 4px;
  border-radius: 3px;
  cursor: default;
  transition: opacity .1s;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 28px;
  font-size: .68rem;
  font-weight: 600;
}
.c3-im-cell:hover { opacity: .7; }
.c3-im-arr { font-size: .72rem; font-weight: 900; vertical-align: middle; margin-left: 1px; }
.c3-im-arr.up { color: #f87171; }
.c3-im-arr.dn { color: #4ade80; }
.c3-im-arr.st { color: #52525b; }
