/* Shared layout for single-command use-case pages (Bug Review, PR Description,
   Fix Suggestions, Q&A with Code, Docstrings, Unit Tests, Tracking Issues):
   an input pane, an output pane, and the result cards they show. */
.cp-page .ri-demo-head {
  align-items: center;
  flex-wrap: wrap;
}
.cp-page .ri-demo-head code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.cp-page .ri-demo-head .ri-toolbar {
  gap: 8px;
  padding: 0;
}
.cp-page .ri-demo-head .ri-toolbar[hidden] {
  display: none;
}
.cp-page .ri-demo-head .ri-toolbar button {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
}
.cp-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.cp-split[hidden] {
  display: none;
}
.cp-in,
.cp-out {
  min-width: 0;
  padding: 28px;
}
.cp-in {
  border-right: 1px solid var(--line);
  background: #fff;
}
.cp-out {
  background: var(--paper);
}
.cp-page .cp-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.cp-page .cp-label svg,
.cp-page .cp-label img {
  width: 18px;
  height: 18px;
}

/* Cards inside the panes */
.cp-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.cp-card + .cp-card,
.cp-say + .cp-card,
.cp-card + .cp-say {
  margin-top: 14px;
}
.cp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.cp-page .cp-card-head code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.cp-card-head > span {
  color: var(--muted);
  font-size: 12px;
}
.cp-card-body {
  padding: 14px 16px;
}
.cp-page .cp-card-body > p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
.cp-page .cp-card-body > p + p,
.cp-page .cp-card-body > p + ul,
.cp-page .cp-card-body > h4 + p,
.cp-page .cp-card-body > ul + h4,
.cp-page .cp-card-body > p + h4 {
  margin-top: 10px;
}
.cp-page .cp-card-body h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.cp-page .cp-card-body ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
.cp-page .cp-card code,
.cp-page .cp-findings code,
.cp-page .cp-checks code {
  font-size: 12px;
}
.cp-page .cp-card pre {
  margin: 0;
  padding: 14px 16px;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cp-page .cp-card pre .cp-add {
  display: block;
  margin: 0 -16px;
  padding: 0 16px;
  background: #e9f6ee;
}
.cp-page .cp-card pre .cp-dim {
  color: var(--muted);
}

/* Numbered findings and plans */
.cp-findings {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-findings li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 3px 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.cp-findings li:first-child {
  padding-top: 0;
  border-top: 0;
}
.cp-findings li > b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.cp-findings small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.cp-detail {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}
.cp-findings .cp-detail {
  grid-column: 2 / -1;
  margin-top: 4px;
}
.cp-page .cp-detail code {
  font-size: 12px;
}
.cp-page .cp-card-body > .cp-muted {
  color: var(--muted);
}
.cp-detail span::before {
  margin-right: 6px;
  color: var(--blue-dark);
  content: "\2192";
}
.cp-pill {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.cp-pill-high {
  background: #fbecee;
  color: #8a3a44;
}
.cp-pill-mid {
  background: #faf4e3;
  color: #6b5726;
}
.cp-pill-low {
  background: #eef2f5;
  color: #4b5a66;
}
.cp-pill-ok {
  background: #e3f3e9;
  color: #226249;
}
.cp-pill-info {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
/* Keep pill colors when a pill sits in a card head, whose spans are muted. */
.cp-card-head > .cp-pill-high {
  color: #8a3a44;
}
.cp-card-head > .cp-pill-mid {
  color: #6b5726;
}
.cp-card-head > .cp-pill-low {
  color: #4b5a66;
}
.cp-card-head > .cp-pill-ok {
  color: #226249;
}
.cp-card-head > .cp-pill-info {
  color: var(--blue-dark);
}

/* Small result tables */
.cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cp-table th,
.cp-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.cp-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.cp-table td:not(:first-child),
.cp-table th:not(:first-child) {
  text-align: right;
}
.cp-page .cp-table code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.cp-table-text td:not(:first-child),
.cp-table-text th:not(:first-child) {
  text-align: left;
}
.cp-table-text td:first-child {
  font-weight: 600;
  white-space: nowrap;
}
.cp-scroll {
  overflow-x: auto;
}

/* Checklist rows */
.cp-checks {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.cp-checks li:first-child {
  padding-top: 0;
  border-top: 0;
}
.cp-page .cp-checks svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 3px;
  color: var(--blue-dark);
}

/* Source lists with a logo per row */
.cp-sources li img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 3px;
  object-fit: contain;
}
.cp-sources li span {
  color: var(--ink-soft);
}
.cp-sources li strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

/* Metric tiles for report examples */
.cp-page .cp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-page .cp-stats li {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.cp-page .cp-stats span,
.cp-page .cp-stats small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.cp-page .cp-stats strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.cp-stats + .cp-card,
.cp-card + .cp-stats,
.cp-stats + .cp-say {
  margin-top: 14px;
}

/* Conversation bits */
.cp-page .cp-say {
  margin: 0;
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.cp-say b {
  margin-right: 6px;
  color: var(--blue-dark);
  font-weight: 600;
}
.cp-page .cp-say code {
  font-size: 13px;
}
.cp-page .cp-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
.cp-page .cp-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 3px;
  color: var(--blue-dark);
}
.cp-page .cp-also {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.cp-page .cp-also a {
  color: var(--blue-dark);
}

.cp-page .cp-card-body > p + .cp-checks {
  margin-top: 12px;
}

/* Settings shown as label and value rows */
.cp-page .cp-card-body dl {
  margin: 0;
}
.cp-page .cp-card-body dl > div:first-child {
  padding-top: 0;
  border-top: 0;
}
.cp-page .cp-card-body dd {
  color: var(--ink);
  font-size: 14px;
}
.cp-on {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 100px;
  background: #e3f3e9;
  color: #226249;
  font-size: 12px;
  font-weight: 600;
}
.cp-on::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.cp-page .cp-card pre .cp-flag {
  display: block;
  margin: 0 -16px;
  padding: 0 16px;
  background: #fbecee;
}

/* Set it up: copy beside numbered steps */
.cp-setup {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 40px;
}
.cp-page .cp-setup-copy p {
  max-width: 46ch;
  margin: 0 0 16px;
}
.cp-steps {
  margin: 0;
  padding: 8px 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  list-style: none;
  counter-reset: cp-step;
}
.cp-steps li {
  position: relative;
  padding: 16px 0 16px 44px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  counter-increment: cp-step;
}
.cp-steps li:first-child {
  border-top: 0;
}
.cp-steps li::before {
  position: absolute;
  top: 15px;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  content: counter(cp-step);
}
.cp-steps small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.cp-page .cp-steps code {
  font-size: 13px;
}

/* The shared 100px right inset makes room for motion controls these pages do not have. */
@media (max-width: 1000px) {
  .cp-page .ri-demo-head {
    padding-right: 24px;
  }
  .cp-setup {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
@media (max-width: 760px) {
  .cp-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .cp-in {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .cp-page .ri-demo-head {
    align-items: flex-start;
    padding-right: 16px;
  }
  .cp-page .ri-demo-head .ri-toolbar {
    align-self: stretch;
  }
  .cp-in,
  .cp-out {
    padding: 20px 16px;
  }
  .cp-steps {
    padding: 4px 18px;
  }
}

/* Several example boxes stacked in one example section (Team Insights,
   Performance Reviews): one box per view, read by scrolling. */
.cp-page .ri-demo + .ri-demo {
  margin-top: 28px;
}
