/*
 * Pixel contract for the approved Codex category report.
 * Source of truth:
 * reports/output-comparison-2026-08-16/01-category-codex.html
 */
body.category-codex-pixel-page {
  margin: 0;
  background: #eef3fa;
  color: #14213d;
  font-size: 14px;
  line-height: 1.6;
}

.category-codex-report {
  position: relative;
  left: 50%;
  width: min(1480px, 100vw);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
}

.category-codex-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 12px;
}

.category-codex-controls .product-research-status {
  flex: 1;
  margin: 0;
}

.category-codex-shell {
  --ink: #14213d;
  --muted: #64748b;
  --line: #e6ebf2;
  --soft: #f6f8fc;
  --blue: #2563eb;
  --blue2: #60a5fa;
  --orange: #f59e0b;
  --orange2: #fb923c;
  --green: #16a34a;
  --red: #dc2626;
  --white: #fff;
  --shadow: 0 10px 30px rgba(30, 64, 175, .07);
  min-height: 100vh;
  max-width: 1480px;
  margin: auto;
  overflow: clip;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 50px rgba(15, 23, 42, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/*
 * The live report is also marked as .category-report-shell and
 * .category-case-report. Those legacy selectors are more specific than the
 * standalone preview styles above, so keep the preview contract authoritative
 * when the modern report is mounted in the production page.
 */
.category-codex-report .category-codex-shell {
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  overflow: visible;
  box-shadow: 0 0 50px rgba(15, 23, 42, .08);
}

.category-codex-report .category-codex-shell .hero {
  gap: normal;
  grid-template-columns: none;
}

.category-codex-report .category-codex-shell .logo {
  font-size: inherit;
  line-height: inherit;
}

.category-codex-report .category-codex-shell .sub {
  font-size: inherit;
  line-height: inherit;
}

.category-codex-report .category-codex-shell .meta {
  grid-template-columns: none;
  align-self: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.category-codex-report .category-codex-shell .meta strong {
  display: inline;
  overflow: visible;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.category-codex-report .category-codex-shell .decision {
  color: var(--ink);
  overflow: visible;
}

.category-codex-report .category-codex-shell .nav {
  position: static;
  gap: normal;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.category-codex-shell *,
.category-codex-shell *::before,
.category-codex-shell *::after {
  box-sizing: border-box;
}

.category-codex-shell button,
.category-codex-shell a {
  font: inherit;
}

.category-codex-shell .hero {
  display: block;
  padding: 38px 42px 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(135deg, #f7fbff 0%, #fff 52%, #fff8ed 100%);
  color: var(--ink);
}

.category-codex-shell .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.category-codex-shell .logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), #4f46e5);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
}

.category-codex-shell .category-case-report-mark,
.category-codex-shell .category-case-report-meta > span {
  margin: 0;
}

.category-codex-shell .eyebrow {
  display: block;
  margin-top: 22px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .08em;
}

.category-codex-shell .hero h1 {
  max-width: none;
  margin: 5px 0 8px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

.category-codex-shell .sub {
  max-width: 1060px;
  margin: 0;
  color: var(--muted);
}

.category-codex-shell .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-codex-shell .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid #dce5f2;
  border-radius: 99px;
  background: #fff;
  color: #475569;
  font-size: 12px;
}

.category-codex-shell .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.category-codex-shell .decision {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin: 24px 42px 0;
  padding: 20px 22px;
  border: 1px solid #f4d79b;
  border-radius: 16px;
  background: #fffbeb;
}

.category-codex-shell .decision .mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: #fff1c7;
  color: #b45309;
  font-size: 20px;
  font-weight: 900;
}

.category-codex-shell .decision h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 18px;
}

.category-codex-shell .decision p {
  margin: 0;
  color: #78510b;
}

.category-codex-shell .decision .status {
  padding: 8px 12px;
  border: 1px solid #f0cf83;
  border-radius: 10px;
  background: #fff;
  color: #b45309;
  font-weight: 700;
  white-space: nowrap;
}

.category-codex-shell .sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.category-codex-shell .nav {
  display: flex;
  min-width: max-content;
  padding: 0 28px;
}

.category-codex-shell .category-report-nav {
  border: 0;
}

.category-codex-shell .nav a {
  padding: 15px 14px 12px;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-weight: 650;
  text-decoration: none;
}

.category-codex-shell .nav a:hover,
.category-codex-shell .nav a:focus-visible,
.category-codex-shell .nav a.active {
  border-color: var(--blue);
  color: var(--blue);
}

.category-codex-shell .category-pixel-main {
  padding: 12px 42px 64px;
}

.category-codex-shell .section {
  scroll-margin-top: 72px;
  margin: 0;
  padding: 34px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.category-codex-shell .section:last-child { border-bottom: 0; }

.category-codex-shell .head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.category-codex-shell .kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.category-codex-shell .head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 24px;
}

.category-codex-shell .head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.category-codex-shell .card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-codex-shell .grid {
  display: grid;
  gap: 14px;
}

.category-codex-shell .metrics { grid-template-columns: repeat(5, 1fr); }

.category-codex-shell .metric {
  position: relative;
  min-height: 120px;
  padding: 17px 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, border-color .2s;
}

.category-codex-shell .metric:hover {
  border-color: #bfd1ff;
  transform: translateY(-2px);
}

.category-codex-shell .metric::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--blue);
  content: "";
}

.category-codex-shell .metric.comp::after { background: var(--orange); }
.category-codex-shell .metric.evidence::after { background: var(--green); }
.category-codex-shell .label { color: var(--muted); font-size: 12px; font-weight: 700; }
.category-codex-shell .value { margin-top: 11px; font-size: 25px; font-weight: 850; letter-spacing: -.03em; }
.category-codex-shell .note { margin-top: 4px; color: #94a3b8; font-size: 11px; }

.category-codex-shell .scope-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: #f8fafc;
  color: #526176;
}

.category-codex-shell .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 14px;
}

.category-codex-shell .tab {
  padding: 8px 12px;
  border: 1px solid #dce3ee;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-weight: 650;
}

.category-codex-shell .tab.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.category-codex-shell .chart-card { padding: 20px; }
.category-codex-shell .chart-title { font-size: 16px; font-weight: 780; }
.category-codex-shell .chart-sub { margin: 2px 0 18px; color: var(--muted); font-size: 12px; }
.category-codex-shell .bars {
  display: grid;
  width: auto;
  height: auto;
  align-items: stretch;
  gap: 11px;
}

.category-codex-shell .bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr 68px;
  align-items: center;
  gap: 12px;
}

.category-codex-shell .bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-codex-shell .track {
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f7;
}

.category-codex-shell .fill {
  min-width: 2px;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--blue2));
}

.category-codex-shell .fill.orange { background: linear-gradient(90deg, var(--orange), var(--orange2)); }
.category-codex-shell .fill.green { background: linear-gradient(90deg, var(--green), #86d163); }
.category-codex-shell .bar-value { text-align: right; font-weight: 750; }
.category-codex-shell .chart-foot { margin-top: 14px; color: #94a3b8; font-size: 11px; }
.category-codex-shell .insights { grid-template-columns: repeat(3, 1fr); }
.category-codex-shell .insight { padding: 18px; }
.category-codex-shell .insight strong { display: block; margin: 8px 0 5px; font-size: 22px; }
.category-codex-shell .insight p { margin: 0; color: var(--muted); }

.category-codex-shell .callout {
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.category-codex-shell .callout.warn { border-color: #fed7aa; background: #fff7ed; }
.category-codex-shell .callout.green { border-color: #bbf7d0; background: #f0fdf4; }
.category-codex-shell .callout h3 { margin: 0 0 6px; font-size: 16px; }
.category-codex-shell .callout p { margin: 0; color: #526176; }
.category-codex-shell .ai-conclusion {
  margin: 0 0 16px;
  padding: 17px 18px;
  border: 1px solid #c9d8fb;
  border-radius: 14px;
  background: #f3f7ff;
}
.category-codex-shell .ai-conclusion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.category-codex-shell .ai-conclusion h3 { margin: 0; color: #1d4ed8; font-size: 16px; }
.category-codex-shell .ai-conclusion .ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
}
.category-codex-shell .ai-conclusion ul { margin: 0; padding-left: 20px; color: #334155; }
.category-codex-shell .ai-conclusion li { margin: 6px 0; line-height: 1.65; }
.category-codex-shell .ai-conclusion .ai-evidence {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d7e2f7;
  color: #64748b;
  font-size: 11px;
}
.category-codex-shell .sample-explanation {
  margin: 14px 0 16px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}
.category-codex-shell .sample-explanation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.category-codex-shell .sample-explanation h3 { margin: 0; color: #0f172a; font-size: 16px; }
.category-codex-shell .sample-total {
  padding: 5px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
}
.category-codex-shell .sample-explanation p { margin: 7px 0; line-height: 1.7; }
.category-codex-shell .sample-breakdown { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0; }
.category-codex-shell .sample-breakdown span {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.category-codex-shell .sample-explanation .scope-warning { color: #64748b; font-size: 12px; }
.category-codex-shell .family-grid { grid-template-columns: repeat(5, 1fr); margin-top: 14px; }
.category-codex-shell .family { padding: 17px; }
.category-codex-shell .family .share { color: var(--blue); font-size: 24px; font-weight: 850; }

.category-codex-shell .table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.category-codex-shell .category-segment-list {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.category-codex-shell .table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

.category-codex-shell .table th {
  position: sticky;
  top: 0;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  text-align: left;
}

.category-codex-shell .table td {
  padding: 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.category-codex-shell .table tr:last-child td { border-bottom: 0; }
.category-codex-shell .asin { color: var(--blue); font-weight: 700; text-decoration: none; }

.category-codex-shell .tag {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eef4ff;
  color: #345cad;
  font-size: 11px;
}

.category-codex-shell .muted { color: var(--muted); }
.category-codex-shell .review-top { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.category-codex-shell .mini { padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.category-codex-shell .review-cols { grid-template-columns: 1fr 1fr; }
.category-codex-shell .signal-list { display: grid; gap: 10px; }

.category-codex-shell .signal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.category-codex-shell .signal:last-child { border-bottom: 0; }
.category-codex-shell .signal small { display: block; color: var(--muted); }
.category-codex-shell .evidence-sample { margin-top: 5px; color: #94a3b8; font-size: 11px; }
.category-codex-shell .risk-grid { grid-template-columns: repeat(2, 1fr); }
.category-codex-shell .risk { padding: 18px; }
.category-codex-shell .risk h3 { margin: 0 0 10px; }
.category-codex-shell .risk ul { margin: 14px 0; padding-left: 40px; }
.category-codex-shell .risk li { margin: 8px 0; color: #475569; }
.category-codex-shell .timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-codex-shell .phase { position: relative; padding: 18px; }
.category-codex-shell .phase .day { color: var(--blue); font-weight: 800; }
.category-codex-shell .phase h3 { margin: 6px 0 10px; }
.category-codex-shell .phase ol { margin: 0; padding-left: 18px; color: #526176; }

.category-codex-shell .phase::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: var(--blue);
  content: "";
}

.category-codex-shell .stops {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
}
.category-codex-shell .stops ul { margin: 14px 0; padding-left: 40px; }
.category-codex-shell .insight ol { margin: 14px 0; padding-left: 18px; }

.category-codex-shell .footer {
  padding: 26px 42px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 12px;
}

.category-codex-shell .footer strong { color: #fff; }

.category-codex-shell .empty {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.category-codex-report .category-evidence-details {
  margin: 14px 0 0;
}

.category-codex-legacy-data { display: none !important; }

@media (max-width: 1050px) {
  .category-codex-shell .metrics { grid-template-columns: repeat(3, 1fr); }
  .category-codex-shell .family-grid { grid-template-columns: repeat(3, 1fr); }
  .category-codex-shell .timeline { grid-template-columns: repeat(2, 1fr); }
  .category-codex-shell .insights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .category-codex-report {
    width: 100%;
  }

  .category-codex-shell .hero,
  .category-codex-shell .category-pixel-main,
  .category-codex-shell .footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .category-codex-shell .decision {
    grid-template-columns: auto 1fr;
    margin-right: 18px;
    margin-left: 18px;
  }

  .category-codex-shell .decision .status { grid-column: 1 / -1; }
  .category-codex-shell .hero h1 { font-size: 27px; }
  .category-codex-shell .metrics,
  .category-codex-shell .family-grid,
  .category-codex-shell .split,
  .category-codex-shell .review-cols,
  .category-codex-shell .risk-grid,
  .category-codex-shell .insights,
  .category-codex-shell .timeline { grid-template-columns: 1fr; }
  .category-codex-shell .head { align-items: flex-start; flex-direction: column; }
  .category-codex-shell .head p { text-align: left; }
  .category-codex-shell .bar-row { grid-template-columns: 100px 1fr 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .category-codex-shell .metric { transition: none; }
}
