.cc {
  --cc-line:#624776;
  --cc-muted:#c6b4d8;
  color:#f3edff;
  font:14px/1.5 system-ui,sans-serif;
  max-width:1680px;
  margin:auto
}

.cc * {
  box-sizing:border-box
}

.cc-hero {
  padding:26px 30px;
  border:1px solid var(--cc-line);
  border-radius:22px;
  background:radial-gradient(ellipse at right,#44355e,transparent 70%),#21162d;
  margin-bottom:22px
}

.cc-brand {
  display:flex;
  align-items:center;
  gap:18px
}

.cc h1 {
  font-size:clamp(23px,2.4vw,36px);
  margin:4px 0!important;
  line-height:1.2
}

.cc h1 img[data-tool-icon] {
  display:none!important
}

.cc-eyebrow {
  font-size:10px;
  font-weight:750;
  letter-spacing:.16em;
  color:#d5b0ff
}

.cc-hero p {
  max-width:850px;
  color:var(--cc-muted);
  margin:16px 0 0
}

.cc-workspace {
  background:#15111e;
  border:1px solid var(--cc-line);
  border-radius:18px;
  overflow:hidden
}

.cc-toolbar,.cc-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:16px 18px;
  background:#291b36
}

.cc-actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  align-items:center
}

.cc button,.cc-button {
  font:600 12px/1.4 system-ui;
  color:#f4eaff;
  border:1px solid #7f5b93;
  background:#382547;
  border-radius:8px;
  padding:10px 12px;
  cursor:pointer;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:39px;
  gap:6px
}

.cc button:hover,.cc-button:hover {
  background:#513266;
  border-color:#c595ed
}

.cc .cc-primary {
  background:#814cbb;
  border-color:#c095e5
}

.cc button:disabled {
  opacity:.45;
  cursor:default
}

.cc button:focus-visible,.cc input:focus-visible,.cc textarea:focus-visible,.cc select:focus-visible,.cc-button:focus-within {
  outline:3px solid #e0bcff;
  outline-offset:2px
}

.cc input,.cc select,.cc textarea {
  font:inherit;
  color:#f4eaff;
  background:#180f23;
  border:1px solid #79568d;
  border-radius:8px;
  padding:10px;
  width:100%;
  min-width:0
}

.cc label {
  display:grid;
  gap:7px;
  font-size:12px;
  color:var(--cc-muted)
}

.cc textarea {
  resize:vertical
}

.cc h2 {
  font-size:16px;
  margin:0 0 15px!important
}

.cc h3 {
  font-size:13px;
  margin:0 0 12px!important
}

.cc-summary {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-bottom:1px solid var(--cc-line);
  background:#21162c
}

.cc-summary>div {
  padding:15px 22px;
  border-right:1px solid #51355f
}

.cc-summary strong {
  display:block;
  color:#d9b4ff;
  font-size:24px
}

.cc-summary span {
  font-size:11px;
  color:var(--cc-muted)
}

.cc-layout {
  display:grid;
  grid-template-columns:230px 300px minmax(0,1fr);
  align-items:start
}

.cc-sources {
  padding:18px;
  background:#25192e;
  border-right:1px solid var(--cc-line);
  min-width:0
}

.cc .cc-source {
  display:block!important;
  text-align:left;
  width:100%;
  min-width:0;
  padding:13px;
  margin-bottom:9px;
  overflow-wrap:anywhere
}

.cc-source strong,.cc-source small {
  display:block
}

.cc-source small {
  font-size:10px;
  color:var(--cc-muted);
  margin-top:6px
}

.cc-source[aria-current=true] {
  background:#4c2e61;
  border-color:#cc9cef
}

.cc-section {
  border-top:1px solid #51355f;
  margin-top:22px;
  padding-top:20px
}

.cc-help {
  font-size:11px;
  line-height:1.6;
  color:var(--cc-muted)
}

.cc-run {
  padding:12px 0;
  border-bottom:1px solid #4b3259;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px;
  align-items:center
}

.cc-run span {
  font-size:11px;
  overflow-wrap:anywhere
}

.cc-run small {
  font-size:10px;
  color:var(--cc-muted)
}

.cc-run button {
  grid-column:2;
  grid-row:1/3;
  padding:5px;
  min-height:30px
}

.cc-review {
  padding:18px;
  border-right:1px solid var(--cc-line);
  min-width:0
}

.cc-heading {
  display:flex;
  gap:10px;
  align-items:start;
  justify-content:space-between;
  margin-bottom:14px;
  min-width:0
}

.cc-heading h2 {
  margin:0!important;
  overflow-wrap:anywhere
}

.cc-heading span {
  font-size:10px;
  color:var(--cc-muted);
  overflow-wrap:anywhere
}

.cc-filter {
  display:grid;
  gap:8px
}

.cc-coverage-map {
  display:flex;
  gap:2px;
  margin:16px 0;
  height:12px;
  overflow:hidden;
  border-radius:4px
}

.cc .cc-segment {
  padding:0;
  min-height:12px;
  min-width:3px;
  border:0;
  border-radius:0;
  background:#777
}

.cc .is-used {
  color:#9be9c8
}

.cc .is-candidate {
  color:#ffd18a
}

.cc .is-protected {
  color:#c3b1e8
}

.cc .cc-segment.is-used {
  background:#68c7a0
}

.cc .cc-segment.is-candidate {
  background:#dfaf63
}

.cc .cc-segment.is-protected {
  background:#9e89c6
}

.cc .cc-segment.is-staged {
  background:#ec879e
}

.cc-rules {
  display:grid;
  gap:8px;
  max-height:650px;
  overflow:auto;
  grid-template-columns:minmax(0,1fr);
  padding:2px
}

.cc .cc-rule {
  display:grid!important;
  gap:7px;
  text-align:left;
  background:#21152d;
  padding:13px;
  min-width:0
}

.cc-rule strong {
  font:600 13px/1.5 monospace;
  overflow-wrap:anywhere
}

.cc-rule small {
  font-size:10px;
  color:var(--cc-muted)
}

.cc-rule[aria-current=true] {
  border-color:#d5a9ff;
  background:#41264f;
  box-shadow:inset 3px 0 #d9b5ff
}

.cc-badge {
  font-size:10px;
  justify-self:start
}

.cc-inspector {
  padding:22px;
  min-width:0;
  background:radial-gradient(ellipse at top,#2c1d3a,transparent 70%)
}

.cc pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  max-height:350px;
  overflow:auto;
  font:12px/1.8 ui-monospace,Consolas,monospace;
  color:#d8eedf;
  background:#12151e;
  border:1px solid #534460;
  border-radius:12px;
  padding:18px;
  margin:15px 0
}

.cc-inspector>.cc-actions {
  margin:12px 0
}

.cc-evidence {
  font-size:11px;
  border-bottom:1px solid #43304f;
  padding:7px 0;
  color:var(--cc-muted);
  margin:0
}

.cc-preview {
  margin-top:22px;
  border-top:1px solid #584064;
  padding-top:20px
}

.cc-preview summary {
  cursor:pointer;
  font-size:13px;
  color:#e6cbff
}

.cc-preview p {
  font-size:11px;
  color:var(--cc-muted)
}

.cc-preview pre {
  max-height:300px
}

.cc-footer {
  border-top:1px solid var(--cc-line)
}

.cc-footer p {
  margin:0;
  flex:1;
  min-width:220px;
  font-size:12px
}

.cc-footer [data-error=true] {
  color:#ffb7c9
}

.cc .cc-confirm {
  display:flex;
  align-items:center;
  max-width:300px;
  font-size:11px
}

.cc-confirm input {
  width:auto;
  flex:0 0 auto
}

.cc-empty {
  font-size:13px;
  padding:20px 0;
  color:var(--cc-muted)
}

.cc-guide {
  padding:24px;
  background:#21172b;
  border:1px solid #52375f;
  border-radius:16px;
  margin-top:24px
}

.cc-guide ol {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:30px;
  padding-left:20px
}

.cc-guide p {
  font-size:12px;
  color:var(--cc-muted)
}

.cc-guide a {
  color:#d7b1ff
}

.cc-focus {
  position:fixed!important;
  inset:0;
  z-index:9999;
  overflow:auto!important;
  border-radius:0!important
}

.cc code {
  overflow-wrap:anywhere
}

@media(max-width:1150px) {
  .cc-layout {
    grid-template-columns:230px minmax(0,1fr)
  }

  .cc-inspector {
    grid-column:1/-1;
    border-top:1px solid var(--cc-line)
  }

  .cc-rules {
    max-height:430px
  }

}

@media(max-width:650px) {
  .cc-layout {
    display:flex;
    flex-direction:column
  }

  .cc-sources,.cc-review,.cc-inspector {
    width:100%;
    border-right:0;
    border-bottom:1px solid var(--cc-line);
    padding:16px
  }

  .cc-summary {
    grid-template-columns:repeat(2,1fr)
  }

  .cc-brand img {
    width:48px;
    height:48px
  }

  .cc-brand {
    gap:12px
  }

  .cc-hero {
    padding:20px
  }

  .cc-sources .cc-section {
    margin-top:15px;
    padding-top:15px
  }

  .cc-rules {
    max-height:290px
  }

  .cc-guide ol {
    grid-template-columns:1fr;
    gap:16px
  }

  .cc-footer .cc-confirm {
    max-width:none
  }

  .cc-footer button {
    width:100%
  }

}


.cc .cc-rule { justify-items: start; align-content: start; }
/* Sources are a shelf; the proposed stylesheet gets its own full-width row. */
.cc-layout {
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
}
.cc-sources {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 1px solid var(--cc-line);
  padding: 16px 20px;
}
.cc-source-bar { display: flex; align-items: center; gap: 18px; }
.cc-source-bar h2 { margin: 0 !important; flex: 0 0 auto; }
#cc-sheets { display: flex; gap: 10px; overflow: auto; padding: 2px; }
.cc .cc-source { width: auto; min-width: 180px; margin: 0; }
.cc-sources .cc-section { margin-top: 12px; padding-top: 12px; }
.cc-sources .cc-section h3 { margin-bottom: 6px !important; }
#cc-runs { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-run { border: 1px solid #594064; border-radius: 9px; padding: 8px 10px; gap: 4px 12px; }
.cc-sources .cc-help { margin: 7px 0 0; }
.cc-sources summary { cursor: pointer; color: #ddc2f2; font-size: 12px; }
.cc-review { padding: 18px; }
.cc .cc-rule { justify-content: stretch; justify-items: start; text-align: left; }
.cc .cc-rule > * { text-align: left; justify-self: start; }
.cc-rules { max-height: 460px; }
.cc-inspector { grid-column: auto; border-top: 0; padding: 18px 22px; }
.cc-inspector pre { max-height: 220px; }
.cc-inspector > .cc-help { margin-bottom: 0; }
.cc-layout > .cc-preview {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 18px 22px;
  border-top: 1px solid var(--cc-line);
  background: #21162b;
}
.cc-layout > .cc-preview pre { margin-bottom: 0; max-height: 280px; }
.cc-layout > .cc-preview p { margin: 8px 0; }
@media (max-width: 900px) {
  .cc-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .cc-inspector { padding: 16px; }
}
@media (max-width: 650px) {
  .cc-layout { display: flex; }
  .cc-source-bar { align-items: flex-start; flex-direction: column; gap: 10px; }
  #cc-sheets { width: 100%; }
  .cc-rules { max-height: 260px; }
  .cc-layout > .cc-preview { padding: 16px; }
}

.cc-rules { max-height: 340px; }
.cc-source-bar > #cc-reset { margin-left: auto; flex: 0 0 auto; }
@media(max-width:650px){.cc-source-bar>#cc-reset{margin-left:0}.cc-rules{max-height:260px}}

/* Keep the review and its inspector flush at the bottom of their row. */
.cc-layout > .cc-review,
.cc-layout > .cc-inspector {
  align-self: stretch;
  height: auto;
  min-height: 0;
}
