:root {
  color-scheme: dark;
  --cn-bg: #020308;
  --cn-bg-soft: #050711;
  --cn-surface: rgba(10, 13, 24, 0.82);
  --cn-surface-raised: rgba(13, 17, 30, 0.92);
  --cn-surface-active: rgba(17, 20, 37, 0.96);
  --cn-line: rgba(164, 181, 215, 0.12);
  --cn-line-strong: rgba(183, 197, 224, 0.2);
  --cn-text: #f2f5fb;
  --cn-secondary: #c4cad6;
  --cn-muted: #8992a4;
  --cn-faint: #737d90;
  --cn-violet: #a95cff;
  --cn-violet-bright: #c77dff;
  --cn-indigo: #6e64ff;
  --cn-blue: #5b8dff;
  --cn-green: #42e69a;
  --cn-green-soft: rgba(31, 211, 131, 0.1);
  --cn-red: #ff625d;
  --cn-red-soft: rgba(219, 45, 58, 0.1);
  --cn-font: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  --cn-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --cn-radius: 13px;
  --cn-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.cn-page,
.cn-page *,
.cn-page *::before,
.cn-page *::after {
  box-sizing: border-box;
}

body.cn-body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--cn-bg);
  color: var(--cn-text);
  font-family: var(--cn-font);
  font-size: 15px;
  font-feature-settings: "cv01", "ss03", "tnum";
  -webkit-font-smoothing: antialiased;
}

.cn-page button,
.cn-page a {
  font: inherit;
}

.cn-page button {
  color: inherit;
}

.cn-skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border: 1px solid var(--cn-violet);
  border-radius: 8px;
  background: #0c0f19;
  color: var(--cn-text);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.cn-skip-link:focus {
  transform: translateY(0);
}

.cn-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cn-page {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 47% 54% at 56% 37%, rgba(116, 70, 202, 0.075), transparent 68%),
    radial-gradient(ellipse 27% 42% at 88% 59%, rgba(35, 158, 112, 0.045), transparent 72%),
    linear-gradient(180deg, #020308 0%, #03050a 58%, #020308 100%);
}

.cn-page::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(155, 170, 201, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 170, 201, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 74%, transparent);
}

.cn-scene {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(560px, 1.65fr) minmax(280px, 0.92fr);
  grid-template-rows: minmax(580px, auto) 85px;
  align-content: start;
  gap: clamp(16px, 1.7vw, 28px) clamp(18px, 2.2vw, 38px);
  width: min(1660px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(24px, 3.4vh, 42px) clamp(24px, 3.5vw, 60px) clamp(22px, 3vh, 34px);
}

.cn-surface {
  position: relative;
  min-width: 0;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 34%),
    var(--cn-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

/* Intro */

.cn-intro {
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 0;
  flex-direction: column;
  align-self: stretch;
  padding: 4px 0 0;
}

.cn-product-identity {
  display: block;
  margin-bottom: clamp(28px, 3.6vh, 36px);
}

.cn-identity-copy {
  min-width: 0;
}

.cn-product-name {
  margin: 0;
  color: var(--cn-text);
  font-size: clamp(28px, 2.35vw, 39px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.cn-product-name span {
  color: var(--cn-violet-bright);
}

.cn-product-tm {
  margin-left: 0.1em;
  color: #d4b4f4;
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0;
  vertical-align: super;
}

.cn-product-descriptor {
  margin: 8px 0 0;
  color: #c07cff;
  font-size: clamp(14px, 1.24vw, 19px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.cn-headline {
  margin: 0;
  max-width: 330px;
  color: var(--cn-text);
  font-size: clamp(24px, 1.85vw, 31px);
  font-weight: 500;
  line-height: 1.23;
  letter-spacing: -0.03em;
}

.cn-headline em {
  display: block;
  margin-top: 2px;
  color: #a89bff;
  font-style: normal;
  text-shadow: 0 0 20px rgba(113, 92, 255, 0.23);
}

.cn-description {
  max-width: 330px;
  margin: 20px 0 0;
  color: var(--cn-secondary);
  font-size: clamp(14px, 1.02vw, 16px);
  line-height: 1.57;
}

.cn-accent-rule {
  display: block;
  width: 52px;
  height: 1px;
  margin: 19px 0 18px;
  background: linear-gradient(90deg, var(--cn-violet), rgba(169, 92, 255, 0));
  box-shadow: 0 0 8px rgba(169, 92, 255, 0.32);
}

.cn-capabilities {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cn-capability {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #b9c0cf;
  font-size: 13px;
  line-height: 1.35;
}

.cn-capability-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: #b779ff;
}

.cn-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.cn-replay {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--cn-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--cn-muted);
  cursor: pointer;
  font-size: 11px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.cn-replay .cn-icon {
  width: 15px;
  height: 15px;
}

.cn-replay:hover {
  border-color: rgba(169, 92, 255, 0.36);
  background: rgba(169, 92, 255, 0.045);
  color: var(--cn-secondary);
}

.cn-replay:disabled {
  cursor: default;
  opacity: 0.48;
}

.cn-summary {
  margin-top: auto;
  padding: 14px 17px 12px;
  border: 1px solid var(--cn-line);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(123, 89, 255, 0.038), transparent 42%),
    rgba(8, 11, 20, 0.68);
}

.cn-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
}

.cn-summary-title {
  margin: 0;
  color: #d5d9e3;
  font-size: 12px;
  font-weight: 500;
}

.cn-summary-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cn-summary-tools .cn-replay {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 9px;
}

.cn-summary-tools .cn-replay .cn-icon {
  width: 12px;
  height: 12px;
}

.cn-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}

.cn-summary-metric strong {
  display: block;
  color: var(--cn-violet-bright);
  font-family: var(--cn-mono);
  font-size: clamp(19px, 1.55vw, 25px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.cn-summary-metric[data-tone="green"] strong {
  color: var(--cn-green);
}

.cn-summary-metric strong small {
  margin-left: 4px;
  color: #b79ee4;
  font-family: var(--cn-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.cn-summary-metric span {
  display: block;
  margin-top: 3px;
  color: var(--cn-muted);
  font-size: 10px;
  line-height: 1.3;
}

.cn-trend {
  display: block;
  width: 100%;
  height: 52px;
  margin: 7px 0 3px;
  overflow: visible;
}

.cn-trend-baseline {
  fill: none;
  stroke: rgba(175, 188, 214, 0.075);
  stroke-width: 1;
}

.cn-trend-area {
  fill: url("#cnTrendArea");
  opacity: 0.58;
}

.cn-trend-line {
  fill: none;
  stroke: url("#cnTrendStroke");
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  filter: drop-shadow(0 0 5px rgba(169, 92, 255, 0.3));
}

.cn-trend-point {
  fill: #070913;
  stroke: #b46cff;
  stroke-width: 1.3;
}

.cn-time-saved {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(166, 180, 208, 0.085);
}

.cn-time-saved span {
  color: var(--cn-muted);
  font-size: 10px;
}

.cn-time-saved strong {
  color: var(--cn-violet-bright);
  font-family: var(--cn-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.cn-time-saved small {
  margin-left: 4px;
  color: #b79ee4;
  font-family: var(--cn-font);
  font-size: 11px;
  font-weight: 400;
}

/* Workspace */

.cn-workspace {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: minmax(340px, 1fr) auto;
  gap: clamp(14px, 1.7vh, 20px);
  min-width: 0;
}

.cn-generated-fix {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  overflow: visible;
  border-color: #30363d;
  background: #0d1117;
  transition: border-color 240ms ease, box-shadow 240ms ease;
}

.cn-generated-fix::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  content: "";
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(169, 92, 255, 0.14), inset 0 0 15px rgba(115, 78, 205, 0.045);
  transition: opacity 280ms ease;
}

.cn-generated-fix::after {
  position: absolute;
  z-index: 3;
  top: 58px;
  bottom: 0;
  left: -1px;
  width: 26%;
  content: "";
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(181, 109, 255, 0.09), rgba(198, 148, 255, 0.14), transparent);
  transform: translateX(-110%);
}

.cn-page[data-stage="root-cause-received"] .cn-generated-fix,
.cn-page[data-stage="generating-fix"] .cn-generated-fix,
.cn-page[data-stage="fix-generated"] .cn-generated-fix {
  border-color: rgba(175, 92, 255, 0.72);
}

.cn-page[data-stage="root-cause-received"] .cn-generated-fix::before,
.cn-page[data-stage="generating-fix"] .cn-generated-fix::before,
.cn-page[data-stage="fix-generated"] .cn-generated-fix::before {
  opacity: 1;
}

.cn-page[data-stage="generating-fix"] .cn-generated-fix::after {
  opacity: 1;
  animation: cn-analysis-sweep 640ms var(--cn-ease) forwards;
}

.cn-panel-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 17px;
  border-bottom: 1px solid #30363d;
  border-radius: calc(var(--cn-radius) - 1px) calc(var(--cn-radius) - 1px) 0 0;
  background: #161b22;
}

.cn-panel-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.cn-panel-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: #8b949e;
}

.cn-panel-icon .cn-icon {
  width: 20px;
  height: 20px;
}

.cn-panel-title-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cn-panel-eyebrow {
  overflow: hidden;
  color: #8b949e;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cn-panel-title h2,
.cn-panel-title h3 {
  max-width: min(42vw, 440px);
  overflow: hidden;
  margin: 0;
  color: #e6edf3;
  font-family: var(--cn-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cn-fix-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.cn-fix-stats {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--cn-mono);
  font-size: 9px;
  white-space: nowrap;
}

.cn-fix-stats .is-add {
  color: #3fb950;
}

.cn-fix-stats .is-del {
  color: #f85149;
}

.cn-confidence {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #30363d;
  border-radius: 999px;
  background: #0d1117;
  white-space: nowrap;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.cn-confidence span {
  color: var(--cn-muted);
  font-size: 9px;
}

.cn-confidence strong {
  color: var(--cn-green);
  font-family: var(--cn-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.cn-confidence.is-related {
  border-color: rgba(66, 230, 154, 0.5);
  box-shadow: 0 0 14px rgba(66, 230, 154, 0.1);
}

.cn-diff-region {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #0d1117;
}

.cn-diff-scroll {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto hidden;
  scrollbar-color: rgba(169, 92, 255, 0.32) transparent;
  scrollbar-width: thin;
}

.cn-diff-code {
  display: block;
  min-width: 600px;
  padding: 0;
  color: #e6edf3;
  font-family: var(--cn-mono);
  font-size: clamp(10.5px, 0.76vw, 12.3px);
  font-variant-ligatures: none;
  line-height: 1.55;
  tab-size: 2;
}

.cn-diff-hunk {
  display: flex;
  min-height: 24px;
  align-items: center;
  margin: 0;
  padding: 2px 14px 2px 102px;
  border-bottom: 1px solid rgba(56, 139, 253, 0.18);
  background: rgba(56, 139, 253, 0.12);
  color: #79c0ff;
  white-space: pre;
}

.cn-diff-block {
  display: block;
  position: relative;
  outline: none;
  transition: opacity 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.cn-diff-line {
  display: grid;
  grid-template-columns: 42px 42px 18px minmax(max-content, 1fr);
  min-height: 20px;
  align-items: stretch;
  padding: 0;
  white-space: pre;
}

.cn-line-old,
.cn-line-new {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 9px;
  border-right: 1px solid #21262d;
  color: #6e7681;
  font-size: 10px;
  user-select: none;
}

.cn-line-mark {
  display: grid;
  place-items: center;
  color: #6e7681;
  user-select: none;
}

.cn-line-code {
  display: flex;
  align-items: center;
  padding: 0 14px 0 3px;
  color: #e6edf3;
}

.cn-diff-block.is-removed {
  margin: 0;
  border-left: 0;
  background: none;
  color: #e6edf3;
}

.cn-diff-block.is-removed .cn-diff-line {
  background: rgba(248, 81, 73, 0.1);
}

.cn-diff-block.is-removed .cn-line-old,
.cn-diff-block.is-removed .cn-line-new {
  background: rgba(248, 81, 73, 0.22);
}

.cn-diff-block.is-removed .cn-line-mark {
  color: #ff7b72;
}

.cn-diff-block.is-added {
  border-left: 0;
  background: none;
  color: #e6edf3;
}

.cn-diff-block.is-added .cn-diff-line {
  background: rgba(46, 160, 67, 0.13);
}

.cn-diff-block.is-added .cn-line-old,
.cn-diff-block.is-added .cn-line-new {
  background: rgba(46, 160, 67, 0.24);
}

.cn-diff-block.is-added .cn-line-mark {
  color: #56d364;
}

.cn-js .cn-diff-block.is-added .cn-diff-line {
  opacity: 0.3;
  transform: translateY(5px);
  transition: opacity 240ms var(--cn-ease), transform 240ms var(--cn-ease);
}

.cn-js .cn-diff-block.is-added .cn-diff-line.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.cn-diff-block:focus-visible,
.cn-diff-block.is-related {
  z-index: 2;
  box-shadow: inset 2px 0 #a371f7;
}

.cn-diff-note {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px 16px;
  border-top: 1px solid #30363d;
  border-radius: 0 0 calc(var(--cn-radius) - 1px) calc(var(--cn-radius) - 1px);
  background: #161b22;
  color: #8b949e;
  font-size: 9px;
  line-height: 1.35;
}

.cn-delivery {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(225px, 0.85fr);
  grid-template-areas: "pr validation";
  min-height: 184px;
  padding: 13px;
  overflow: visible;
  background: rgba(8, 11, 20, 0.74);
}

.cn-delivery::before {
  position: absolute;
  top: -21px;
  left: 49.5%;
  width: 1px;
  height: 21px;
  content: "";
  background: linear-gradient(to bottom, rgba(169, 92, 255, 0), rgba(169, 92, 255, 0.72));
  box-shadow: 0 0 8px rgba(169, 92, 255, 0.46);
}

.cn-delivery::after {
  position: absolute;
  top: -4px;
  left: calc(49.5% - 3px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bd74ff;
  box-shadow: 0 0 12px rgba(178, 101, 255, 0.78);
  content: "";
  opacity: 0.35;
  transition: opacity 200ms ease;
}

.cn-page[data-stage="validating"] .cn-delivery::after,
.cn-page[data-stage="security-scanning"] .cn-delivery::after,
.cn-page[data-stage="creating-pr"] .cn-delivery::after,
.cn-page[data-stage="completed"] .cn-delivery::after {
  opacity: 1;
}

.cn-pull-request {
  display: flex;
  grid-area: pr;
  min-width: 0;
  flex-direction: column;
  padding: 3px 14px 1px 3px;
  outline: none;
  transition: opacity 220ms ease, filter 220ms ease;
}

.cn-pr-heading,
.cn-validation-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: #caa0f8;
  font-size: 12px;
  font-weight: 500;
}

.cn-pr-heading .cn-icon,
.cn-validation-heading .cn-icon {
  width: 18px;
  height: 18px;
}

.cn-pr-card {
  display: grid;
  min-height: 125px;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr auto;
  gap: 5px 10px;
  padding: 11px 12px;
  border: 1px solid rgba(165, 179, 207, 0.12);
  border-radius: 9px;
  background: rgba(3, 5, 11, 0.43);
  transition: border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.cn-pr-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  grid-column: 1;
  grid-row: 1 / span 3;
  place-items: center;
  border: 1px solid rgba(178, 104, 255, 0.33);
  border-radius: 50%;
  background: rgba(169, 92, 255, 0.11);
  color: #c38aff;
}

.cn-pr-icon .cn-icon {
  width: 19px;
  height: 19px;
}

.cn-pr-topline {
  display: flex;
  min-width: 0;
  grid-column: 2;
  align-items: center;
  gap: 8px;
}

.cn-pr-id {
  color: var(--cn-text);
  font-family: var(--cn-mono);
  font-size: 12px;
  font-weight: 500;
}

.cn-pr-status {
  padding: 2px 6px;
  border: 1px solid rgba(169, 92, 255, 0.28);
  border-radius: 5px;
  background: rgba(169, 92, 255, 0.045);
  color: var(--cn-muted);
  font-family: var(--cn-mono);
  font-size: 8.5px;
}

.cn-pull-request[data-status="preparing"] .cn-pr-status {
  border-color: rgba(169, 92, 255, 0.42);
  color: var(--cn-violet-bright);
}

.cn-pull-request[data-status="ready"] .cn-pr-status {
  border-color: rgba(66, 230, 154, 0.34);
  background: rgba(66, 230, 154, 0.055);
  color: var(--cn-green);
}

.cn-pr-title {
  grid-column: 2;
  color: #e4e7ee;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.cn-pr-copy {
  grid-column: 2;
  color: var(--cn-muted);
  font-family: var(--cn-mono);
  font-size: 9px;
  line-height: 1.45;
}

.cn-pr-copy span {
  display: block;
}

.cn-pr-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.cn-pr-stats {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--cn-faint);
  font-family: var(--cn-mono);
  font-size: 8.5px;
}

.cn-pr-stats .is-add {
  color: var(--cn-green);
}

.cn-pr-stats .is-del {
  color: var(--cn-red);
}

.cn-pr-action {
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid rgba(178, 100, 255, 0.4);
  border-radius: 6px;
  background: rgba(169, 92, 255, 0.055);
  color: #c78aff;
  cursor: pointer;
  font-size: 9px;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cn-pr-action:hover:not(:disabled) {
  border-color: rgba(197, 131, 255, 0.72);
  background: rgba(169, 92, 255, 0.11);
  color: #ddb5ff;
}

.cn-pr-action:disabled {
  cursor: default;
  opacity: 0.34;
}

.cn-pull-request[data-status="waiting"] .cn-pr-card {
  opacity: 0.5;
}

.cn-pull-request[data-status="preparing"] .cn-pr-card {
  border-color: rgba(169, 92, 255, 0.42);
  opacity: 0.82;
}

.cn-pull-request:focus-visible .cn-pr-card,
.cn-pull-request.is-related .cn-pr-card {
  border-color: rgba(169, 92, 255, 0.44);
  box-shadow: inset 0 0 18px rgba(125, 77, 197, 0.035), 0 0 17px rgba(169, 92, 255, 0.05);
}

.cn-pull-request[data-status="ready"] .cn-pr-card,
.cn-pull-request[data-status="ready"]:focus-visible .cn-pr-card,
.cn-pull-request[data-status="ready"].is-related .cn-pr-card {
  border-color: rgba(66, 230, 154, 0.42);
  box-shadow: inset 0 0 18px rgba(33, 177, 111, 0.035), 0 0 17px rgba(66, 230, 154, 0.05);
  opacity: 1;
}

.cn-validation {
  position: relative;
  grid-area: validation;
  min-width: 0;
  padding-left: 13px;
  border-left: 1px solid rgba(165, 179, 207, 0.09);
}

.cn-validation-heading {
  color: #d4d8e1;
}

.cn-validation-list {
  display: grid;
  gap: 2px;
}

.cn-validation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  min-height: 29px;
  align-items: center;
  gap: 7px;
  padding: 5px 5px 5px 8px;
  border-radius: 6px;
  outline: none;
  overflow: hidden;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.cn-validation-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  content: "";
  background: linear-gradient(90deg, rgba(169, 92, 255, 0.12), transparent);
}

.cn-validation-row[data-status="running"]::before {
  animation: cn-validation-trace 330ms var(--cn-ease) forwards;
}

.cn-validation-label {
  color: #c9ced8;
  font-size: 9px;
  line-height: 1.25;
}

.cn-validation-result {
  color: var(--cn-faint);
  font-family: var(--cn-mono);
  font-size: 9px;
  text-align: right;
}

.cn-validation-check {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(136, 150, 177, 0.16);
  border-radius: 50%;
  color: transparent;
  font-size: 9px;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cn-validation-row[data-status="running"] {
  background: rgba(169, 92, 255, 0.045);
}

.cn-validation-row[data-status="running"] .cn-validation-result {
  color: #bd8aea;
}

.cn-validation-row[data-status="passed"] .cn-validation-result {
  color: var(--cn-green);
}

.cn-validation-row[data-status="passed"] .cn-validation-check {
  border-color: rgba(66, 230, 154, 0.35);
  background: rgba(66, 230, 154, 0.07);
  color: var(--cn-green);
}

.cn-validation-row:focus-visible,
.cn-validation-row.is-related {
  background: rgba(169, 92, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(183, 113, 245, 0.28);
}

.cn-validation-complete {
  position: absolute;
  right: -27px;
  bottom: 45px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(66, 230, 154, 0.25);
  border-radius: 50%;
  background: #06100d;
  color: var(--cn-green);
  opacity: 0.3;
  box-shadow: 0 0 0 6px rgba(66, 230, 154, 0.015);
  transform: scale(0.86);
  transition: opacity 240ms ease, transform 240ms var(--cn-ease), border-color 240ms ease, box-shadow 240ms ease;
}

.cn-validation-complete .cn-icon {
  width: 20px;
  height: 20px;
}

.cn-validation[data-complete="true"] .cn-validation-complete {
  border-color: rgba(66, 230, 154, 0.72);
  opacity: 1;
  box-shadow: 0 0 0 6px rgba(66, 230, 154, 0.035), 0 0 18px rgba(66, 230, 154, 0.15);
  transform: scale(1);
}

.cn-delivery-connector {
  position: absolute;
  top: -168px;
  right: -29px;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, rgba(169, 92, 255, 0.12), rgba(169, 92, 255, 0.72));
  box-shadow: 0 0 8px rgba(169, 92, 255, 0.28);
  opacity: 0.5;
}

/* Pipeline */

.cn-pipeline {
  display: flex;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  flex-direction: column;
  padding: 19px 17px 17px;
  background:
    linear-gradient(180deg, rgba(105, 72, 183, 0.028), transparent 36%),
    rgba(6, 9, 16, 0.82);
}

.cn-pipeline-header {
  display: flex;
  min-height: 32px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cn-pipeline-header h2 {
  margin: 0;
  color: #e9eaf0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cn-pipeline-header span {
  color: var(--cn-faint);
  font-family: var(--cn-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cn-pipeline-list {
  position: relative;
  display: grid;
  flex: 1;
  gap: clamp(13px, 2vh, 22px);
  padding: 12px 0 0;
  margin: 0;
  list-style: none;
}

.cn-pipeline-list::before {
  position: absolute;
  z-index: 0;
  top: 46px;
  bottom: 46px;
  left: 35px;
  width: 1px;
  content: "";
  background: linear-gradient(to bottom, rgba(169, 92, 255, 0.72), rgba(123, 97, 255, 0.42) 70%, rgba(66, 230, 154, 0.68));
  box-shadow: 0 0 8px rgba(169, 92, 255, 0.28);
}

.cn-pipeline-list::after {
  position: absolute;
  z-index: 1;
  top: 47px;
  left: 33px;
  width: 5px;
  height: 34px;
  border-radius: 999px;
  content: "";
  opacity: 0;
  background: linear-gradient(to bottom, transparent, #fff, var(--cn-violet), transparent);
  filter: drop-shadow(0 0 5px rgba(191, 119, 255, 0.9));
}

.cn-page:not([data-stage="idle"]) .cn-pipeline-list::after {
  opacity: 0.75;
  animation: cn-pipeline-travel 1.9s linear 1;
}

.cn-pipeline-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  min-height: 72px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px 8px 6px;
  border: 1px solid rgba(157, 174, 205, 0.11);
  border-radius: 11px;
  background: rgba(8, 11, 20, 0.79);
  outline: none;
  transition: opacity 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.cn-pipeline-node {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(177, 103, 255, 0.32);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 92, 255, 0.12), rgba(29, 18, 52, 0.18) 62%, rgba(4, 6, 12, 0.85));
  color: #c491ff;
  box-shadow: 0 0 0 7px rgba(169, 92, 255, 0.02);
  transition: border-color 220ms ease, color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.cn-pipeline-node .cn-icon {
  width: 23px;
  height: 23px;
}

.cn-pipeline-copy {
  min-width: 0;
}

.cn-pipeline-copy strong {
  display: block;
  color: #c8bcdf;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.cn-pipeline-copy span {
  display: block;
  margin-top: 4px;
  color: #9ba3b2;
  font-size: 9px;
  line-height: 1.3;
}

.cn-stage-status {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(136, 150, 177, 0.18);
  border-radius: 50%;
  color: var(--cn-faint);
  font-size: 10px;
  line-height: 1;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.cn-pipeline-stage[data-status="waiting"] {
  opacity: 0.52;
}

.cn-pipeline-stage[data-status="active"] {
  border-color: rgba(175, 93, 255, 0.43);
  background: linear-gradient(90deg, rgba(169, 92, 255, 0.055), rgba(8, 11, 20, 0.88));
  box-shadow: 0 0 19px rgba(169, 92, 255, 0.055);
  opacity: 1;
}

.cn-pipeline-stage[data-status="active"] .cn-pipeline-node {
  border-color: rgba(191, 118, 255, 0.78);
  color: #d6a4ff;
  box-shadow: 0 0 0 7px rgba(169, 92, 255, 0.04), 0 0 22px rgba(169, 92, 255, 0.16);
}

.cn-pipeline-stage[data-status="active"] .cn-stage-status {
  border-color: rgba(169, 92, 255, 0.5);
  color: #c388ff;
}

.cn-pipeline-stage[data-status="complete"] {
  opacity: 1;
}

.cn-pipeline-stage[data-status="complete"] .cn-stage-status {
  border-color: rgba(66, 230, 154, 0.72);
  background: rgba(66, 230, 154, 0.055);
  color: var(--cn-green);
}

.cn-pipeline-stage[data-stage-id="pull-request"][data-status="complete"] {
  border-color: rgba(66, 230, 154, 0.52);
  background: linear-gradient(90deg, rgba(27, 160, 100, 0.08), rgba(8, 18, 15, 0.82));
  box-shadow: inset 0 0 20px rgba(66, 230, 154, 0.025), 0 0 20px rgba(66, 230, 154, 0.055);
}

.cn-pipeline-stage[data-stage-id="pull-request"][data-status="complete"] .cn-pipeline-node {
  border-color: rgba(66, 230, 154, 0.68);
  background: radial-gradient(circle, rgba(66, 230, 154, 0.13), rgba(8, 38, 25, 0.18) 62%, rgba(4, 10, 8, 0.9));
  color: var(--cn-green);
  box-shadow: 0 0 0 7px rgba(66, 230, 154, 0.035), 0 0 22px rgba(66, 230, 154, 0.12);
}

.cn-pipeline-stage:focus-visible,
.cn-pipeline-stage.is-related {
  border-color: rgba(195, 126, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(176, 103, 243, 0.1), 0 0 18px rgba(169, 92, 255, 0.08);
  opacity: 1;
}

/* Outcome */

.cn-outcome {
  display: grid;
  grid-column: 2 / 4;
  grid-row: 2;
  grid-template-columns: minmax(270px, 1.35fr) repeat(4, minmax(115px, 0.62fr));
  min-height: 82px;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  padding: 13px 20px;
  border: 1px solid rgba(161, 178, 207, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(26, 35, 53, 0.26), rgba(7, 10, 18, 0.66) 47%, rgba(14, 27, 24, 0.38)),
    rgba(5, 8, 14, 0.76);
  opacity: 0.52;
  overflow: hidden;
  transform: translateY(6px);
  transition: opacity 360ms ease, transform 360ms var(--cn-ease), border-color 360ms ease;
}

.cn-outcome::before {
  position: absolute;
  top: -1px;
  right: 7%;
  left: 7%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(169, 92, 255, 0.5), rgba(66, 230, 154, 0.42), transparent);
  opacity: 0.6;
}

.cn-page[data-stage="completed"] .cn-outcome {
  border-color: rgba(135, 169, 165, 0.17);
  opacity: 1;
  transform: translateY(0);
}

.cn-outcome-assurance {
  display: grid;
  grid-template-columns: 41px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.cn-assurance-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  color: #aeb9cc;
}

.cn-assurance-icon .cn-icon {
  width: 35px;
  height: 35px;
  stroke-width: 1.35;
}

.cn-outcome-assurance h2 {
  margin: 0;
  color: #a9a4ff;
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.cn-outcome-assurance p {
  margin: 4px 0 0;
  color: var(--cn-muted);
  font-size: 10px;
  line-height: 1.35;
}

.cn-outcome-metric {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.cn-outcome-metric > .cn-icon {
  width: 23px;
  height: 23px;
  color: #b9c2d2;
  stroke-width: 1.4;
}

.cn-outcome-metric strong {
  display: block;
  color: #c477ff;
  font-family: var(--cn-mono);
  font-size: clamp(14px, 1.2vw, 19px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.cn-outcome-metric span {
  display: block;
  margin-top: 3px;
  color: var(--cn-muted);
  font-size: 8.5px;
  line-height: 1.25;
}

/* Arrival */

.cn-js .cn-product-identity,
.cn-js .cn-intro-copy,
.cn-js .cn-capabilities,
.cn-js .cn-summary,
.cn-js .cn-generated-fix,
.cn-js .cn-delivery,
.cn-js .cn-pipeline {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--cn-ease), transform 420ms var(--cn-ease);
}

.cn-js.is-rendered .cn-product-identity,
.cn-js.is-rendered .cn-generated-fix,
.cn-js.is-rendered .cn-pipeline {
  opacity: 1;
  transform: translateY(0);
}

.cn-js.is-rendered .cn-intro-copy {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 50ms;
}

.cn-js.is-rendered .cn-capabilities,
.cn-js.is-rendered .cn-delivery {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 100ms;
}

.cn-js.is-rendered .cn-summary {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 150ms;
}

/* Shared focus */

.cn-page :where(button, a, [tabindex="0"]):focus-visible {
  outline: 2px solid rgba(193, 125, 255, 0.86);
  outline-offset: 3px;
}

@keyframes cn-analysis-sweep {
  from { transform: translateX(-110%); }
  to { transform: translateX(480%); }
}

@keyframes cn-validation-trace {
  0% { width: 0; opacity: 0; }
  20% { opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

@keyframes cn-pipeline-travel {
  from { transform: translateY(0); }
  to { transform: translateY(calc(100% + 360px)); }
}

/* Compact desktop */

@media (max-height: 820px) and (min-width: 1241px) {
  .cn-scene {
    gap: 15px 25px;
    padding-top: 24px;
    padding-bottom: 9px;
  }

  .cn-product-identity {
    margin-bottom: 27px;
  }

  .cn-description {
    margin-top: 20px;
    line-height: 1.5;
  }

  .cn-accent-rule {
    margin-top: 19px;
    margin-bottom: 18px;
  }

  .cn-capabilities {
    gap: 9px;
  }

  .cn-summary {
    padding-top: 14px;
    padding-bottom: 11px;
  }

  .cn-summary-metrics {
    gap: 9px 14px;
  }

  .cn-trend {
    height: 52px;
    margin-top: 7px;
  }

  .cn-workspace {
    grid-template-rows: minmax(320px, 1fr) auto;
  }

  .cn-generated-fix {
    min-height: 320px;
  }

  .cn-diff-code {
    line-height: 1.46;
  }

  .cn-delivery {
    min-height: 170px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .cn-pr-card {
    min-height: 113px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .cn-validation-row {
    min-height: 26px;
  }

  .cn-pipeline {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .cn-pipeline-list {
    gap: 11px;
    padding-top: 8px;
  }

  .cn-pipeline-stage {
    min-height: 66px;
  }

  .cn-pipeline-node {
    width: 51px;
    height: 51px;
  }

  .cn-pipeline-list::before {
    left: 32px;
  }

  .cn-pipeline-list::after {
    left: 30px;
  }

  .cn-outcome {
    min-height: 76px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Tablet landscape */

@media (max-width: 1240px) {
  .cn-scene {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    grid-template-rows: auto auto auto;
    min-height: auto;
    padding: 28px 24px 30px;
  }

  .cn-intro {
    display: grid;
    grid-column: 1 / 3;
    grid-row: 1;
    grid-template-columns: minmax(300px, 0.88fr) minmax(360px, 1.12fr);
    gap: 18px 38px;
    padding: 0;
  }

  .cn-product-identity {
    grid-column: 1;
    margin-bottom: 8px;
  }

  .cn-intro-copy {
    grid-column: 1;
  }

  .cn-headline,
  .cn-description {
    max-width: 430px;
  }

  .cn-description {
    margin-top: 17px;
  }

  .cn-accent-rule {
    margin: 17px 0 15px;
  }

  .cn-capabilities {
    grid-column: 2;
    grid-row: 1;
    align-content: end;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 18px;
    padding-top: 15px;
  }

  .cn-summary {
    display: grid;
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px 20px;
    align-self: end;
    margin-top: 56px;
  }

  .cn-summary-header {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .cn-summary-metrics {
    gap: 9px 14px;
  }

  .cn-trend-wrap {
    align-self: end;
  }

  .cn-trend {
    height: 58px;
    margin-top: 0;
  }

  .cn-workspace {
    grid-column: 1;
    grid-row: 2;
  }

  .cn-pipeline {
    grid-column: 2;
    grid-row: 2;
  }

  .cn-outcome {
    grid-column: 1 / 3;
    grid-row: 3;
  }
}

@media (max-width: 930px) {
  .cn-intro {
    grid-template-columns: minmax(270px, 0.8fr) minmax(330px, 1.2fr);
    gap: 18px 26px;
  }

  .cn-workspace {
    grid-template-rows: minmax(340px, auto) auto;
  }

  .cn-delivery {
    grid-template-columns: 1fr;
    grid-template-areas:
      "validation"
      "pr";
    gap: 14px;
  }

  .cn-validation {
    padding: 0 0 13px;
    border-bottom: 1px solid rgba(165, 179, 207, 0.09);
    border-left: 0;
  }

  .cn-pull-request {
    padding: 0;
  }

  .cn-validation-complete {
    right: 3px;
    bottom: 14px;
  }

  .cn-outcome {
    grid-template-columns: minmax(250px, 1.25fr) repeat(2, minmax(115px, 0.65fr));
  }

  .cn-outcome-metric:nth-of-type(n + 4) {
    display: none;
  }
}

/* Tablet portrait and mobile */

@media (max-width: 820px) {
  .cn-page {
    overflow: visible;
  }

  .cn-scene {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 18px;
    padding: 26px 18px 30px;
  }

  .cn-intro {
    display: contents;
  }

  .cn-product-identity {
    order: 1;
    margin: 0;
  }

  .cn-intro-copy {
    order: 2;
  }

  .cn-headline,
  .cn-description {
    max-width: 650px;
  }

  .cn-capabilities {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 3px 0;
  }

  .cn-summary {
    order: 5;
    width: 100%;
    align-self: stretch;
    margin: 0;
  }

  .cn-workspace {
    display: contents;
  }

  .cn-generated-fix {
    order: 6;
    min-height: 390px;
  }

  .cn-delivery {
    order: 7;
  }

  .cn-pipeline {
    order: 8;
    min-height: auto;
  }

  .cn-outcome {
    order: 9;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cn-outcome-assurance {
    grid-column: 1 / -1;
  }

  .cn-outcome .cn-outcome-metric {
    display: grid;
  }

  .cn-delivery-connector,
  .cn-delivery::before,
  .cn-delivery::after {
    display: none;
  }

  .cn-pipeline-list {
    gap: 12px;
  }

  .cn-pipeline-list::before {
    top: 43px;
    bottom: 43px;
  }

  .cn-outcome {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .cn-page {
    font-size: 14px;
  }

  .cn-scene {
    gap: 16px;
    padding: 21px 14px 26px;
  }

  .cn-product-name {
    font-size: 28px;
  }

  .cn-product-descriptor {
    font-size: 14px;
  }

  .cn-headline {
    font-size: 25px;
  }

  .cn-description {
    font-size: 14px;
  }

  .cn-capabilities {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cn-summary {
    padding: 16px;
  }

  .cn-summary-metrics {
    gap: 12px;
  }

  .cn-summary-metric strong {
    font-size: 21px;
  }

  .cn-generated-fix {
    min-height: 410px;
  }

  .cn-panel-header {
    min-height: 64px;
    align-items: flex-start;
    padding: 12px;
  }

  .cn-panel-title {
    padding-top: 4px;
  }

  .cn-fix-meta {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 5px;
  }

  .cn-diff-code {
    min-width: 710px;
    font-size: 11px;
    line-height: 1.6;
  }

  .cn-delivery {
    padding: 12px;
  }

  .cn-pr-card {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px;
  }

  .cn-pr-icon {
    width: 32px;
    height: 32px;
  }

  .cn-pr-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cn-pr-action {
    width: 100%;
  }

  .cn-pipeline {
    padding: 16px 12px 14px;
  }

  .cn-pipeline-stage {
    grid-template-columns: 49px minmax(0, 1fr) 20px;
    min-height: 67px;
  }

  .cn-pipeline-node {
    width: 47px;
    height: 47px;
  }

  .cn-pipeline-list::before {
    left: 29px;
  }

  .cn-pipeline-list::after {
    left: 27px;
  }

  .cn-outcome {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
    padding: 16px;
  }

  .cn-outcome-assurance {
    grid-column: 1 / -1;
  }

  .cn-outcome .cn-outcome-metric {
    display: grid;
  }
}

/* No-script */

.cn-static-fallback {
  width: min(760px, calc(100% - 32px));
  margin: 32px auto;
  padding: 24px;
  border: 1px solid var(--cn-line);
  border-radius: 12px;
  background: var(--cn-surface-raised);
  color: var(--cn-secondary);
}

.cn-static-fallback h1,
.cn-static-fallback h2 {
  margin: 0 0 18px;
  color: var(--cn-text);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
}

.cn-static-fallback p,
.cn-static-fallback li {
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .cn-page,
  .cn-page *,
  .cn-page *::before,
  .cn-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cn-js .cn-diff-block.is-added .cn-diff-line {
    opacity: 1;
    transform: none;
  }

  .cn-pipeline-list::after,
  .cn-generated-fix::after {
    display: none;
  }
}
