/* ==========================================================================
   Capability map: "everything CloudAEye does"

   Sourced from docs.cloudaeye.com;
   load after foundation.css so the tokens exist.
   ========================================================================== */

.cx-features {
  padding: 104px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.cx-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px;
  align-items: start;
}

.cx-fgroup {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 26px 24px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 240ms var(--ease),
    box-shadow 240ms var(--ease),
    transform 240ms var(--ease);
}

.cx-fgroup:hover {
  border-color: var(--blue);
  box-shadow: 0 22px 46px -28px rgba(6, 78, 94, 0.26);
  transform: translateY(-3px);
}

.cx-fgroup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cx-fgroup-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.022em;
}

.cx-fgroup-count {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.cx-fgroup ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cx-fgroup li {
  position: relative;
  padding-left: 17px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.5;
}

.cx-fgroup li::before {
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

/* Starred rows are the differentiators */
.cx-fgroup li.is-key {
  color: var(--ink);
  font-weight: 600;
}

.cx-fgroup li.is-key::before {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.cx-fgroup li code {
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.88em;
}

.cx-fgroup li em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.cx-fgroup-foot {
  margin: auto 0 0;
  padding-top: 16px;
}

.cx-fgroup-foot a {
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Checklist categories strip
   -------------------------------------------------------------------------- */

.cx-checklist-strip {
  margin-top: 20px;
  padding: 28px 26px;
  background: var(--blue-tint);
  border: 1px solid #bfe6ee;
  border-radius: var(--radius);
}

.cx-checklist-strip > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.cx-checklist-strip h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.022em;
}

.cx-checklist-strip > header > span {
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.cx-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cx-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #bfe6ee;
  border-radius: 100px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.cx-cat i {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-style: normal;
}

.cx-cat.is-ai {
  background: var(--lime-soft);
  border-color: #cbe694;
  color: var(--lime-dark);
}

.cx-cat.is-ai i {
  color: #6a8f2a;
}

/* --------------------------------------------------------------------------
   Linter marquee
   -------------------------------------------------------------------------- */

.cx-linters {
  margin-top: 20px;
  padding: 22px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cx-linters > span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cx-linter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cx-linter-list code {
  padding: 6px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
}

@media (max-width: 780px) {
  .cx-features {
    padding: 74px 0;
  }

  .cx-checklist-strip,
  .cx-linters {
    padding: 22px 18px;
  }
}

/* ==========================================================================
   Two flows: pre-commit in the terminal, post-commit on the pull request
   ========================================================================== */

.cx-flows {
  padding: 92px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.cx-flows-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
}

.cx-flow {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 30px 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--flow-accent, var(--blue));
  border-radius: var(--radius);
  box-shadow: 0 20px 44px -30px rgba(6, 78, 94, 0.24);
}

.cx-flow-pre {
  --flow-accent: var(--blue);
}

.cx-flow-post {
  --flow-accent: #8bb63c;
}

.cx-flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cx-flow-head code {
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cx-flow-post .cx-flow-head code {
  color: var(--lime-dark);
}

.cx-flow-native {
  padding: 3px 9px;
  background: var(--lime-soft);
  border: 1px solid #cbe694;
  border-radius: 100px;
  color: var(--lime-dark);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cx-flow h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.24rem, 1.9vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.026em;
  line-height: 1.18;
}

.cx-flow > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
}

.cx-flow ul {
  display: grid;
  gap: 8px;
  padding: 18px 0 0;
  margin: 0;
  list-style: none;
}

.cx-flow li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cx-flow li::before {
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--flow-accent);
  content: "";
}

.cx-flow li code {
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.88em;
}

.cx-flow-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: auto 0 0;
  padding-top: 20px;
}

.cx-flow-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.cx-flows-join {
  display: grid;
  width: 60px;
  place-items: center;
  color: var(--line-strong);
  font-size: 1.4rem;
}

.cx-flows-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 20px;
  padding: 18px 24px;
  background: var(--ink);
  border-radius: var(--radius);
  color: #dfeaee;
  font-size: 0.88rem;
  text-align: center;
}

.cx-flows-foot b {
  color: #cdf19a;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 1060px) {
  .cx-flows-grid {
    grid-template-columns: 1fr;
  }

  .cx-flows-join {
    width: auto;
    height: 30px;
    transform: rotate(90deg);
  }
}

@media (max-width: 780px) {
  .cx-flows {
    padding: 68px 0;
  }
}

/* ==========================================================================
   Deterministic, enforceable standards: rules, feedback, learning

   Mechanics per docs.cloudaeye.com "Context & Learning": rules are written in
   plain English and scoped by repo / file pattern / directory; a thumbs-down on
   a finding auto-generates a custom rule which then acts as context on later
   reviews.
   ========================================================================== */

.cx-standards {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* --- console mock ------------------------------------------------------- */

.cx-std-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 46px;
}

.cx-std-rules {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 52px -32px rgba(6, 78, 94, 0.26);
}

.cx-std-rules > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
}

.cx-std-rules > header b {
  color: var(--lime-dark);
  font-size: 0.66rem;
  font-weight: 500;
}

.cx-rule {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.cx-rule > p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.cx-rule > p code,
.cx-rule-meta > code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.cx-rule-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}

.cx-rule-cat {
  padding: 4px 9px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cx-rule-cat.is-sec {
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.cx-rule-cat.is-team {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.cx-rule-cat.is-qual {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.cx-rule-meta > code {
  padding: 3px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue-deep);
  font-size: 0.7rem;
}

.cx-rule-meta > em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.cx-toggle {
  display: inline-flex;
  width: 30px;
  height: 17px;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
  padding: 2px;
  background: var(--line);
  border-radius: 100px;
}

.cx-toggle i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: transform 200ms var(--ease);
}

.cx-toggle.is-on {
  background: #8bb63c;
}

.cx-toggle.is-on i {
  transform: translateX(13px);
}

.cx-std-rules > footer {
  padding: 14px 20px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* --- feedback -> rule loop --------------------------------------------- */

.cx-std-loop {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  background: var(--blue-tint);
  border: 1px solid #bfe6ee;
  border-radius: var(--radius);
}

.cx-std-tag {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cx-std-tag.is-auto {
  color: var(--lime-dark);
}

.cx-fb {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.cx-fb strong {
  display: block;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.cx-fb em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.5;
}

.cx-fb code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.cx-fb-thumb {
  font-size: 0.95rem;
  line-height: 1.4;
  filter: grayscale(1);
}

.cx-fb-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.cx-fb-out {
  border-color: #cbe694;
  background: #fcfff6;
}

.cx-std-arrow {
  color: var(--blue);
  font-size: 1.2rem;
  text-align: center;
}

.cx-std-note {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

/* --- standards overview ------------------------------------------------ */

.cx-std-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cx-std-point {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  border-top: 2px solid var(--line-strong);
}

.cx-std-point:first-child {
  border-top-color: var(--blue);
}

.cx-std-num {
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

.cx-std-point:first-child .cx-std-num {
  color: var(--blue);
}

.cx-std-point .cx-h3 {
  font-size: 1.14rem;
}

.cx-std-point .cx-body {
  font-size: 0.88rem;
}

.cx-std-point code {
  padding: 2px 6px;
  background: var(--paper);
  border-radius: 4px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.86em;
}

@media (max-width: 1060px) {
  .cx-std-board {
    grid-template-columns: 1fr;
  }

  .cx-std-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
}

@media (max-width: 780px) {
  .cx-std-points {
    grid-template-columns: 1fr;
  }

  .cx-standards {
    padding: 74px 0;
  }
}

/* Wordmarks on the standards overview */

.cx-std-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cx-std-word {
  color: var(--blue-dark);
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cx-std-point:nth-child(2) .cx-std-word {
  color: var(--amber-dark);
}

.cx-std-point:nth-child(3) .cx-std-word {
  color: var(--lime-dark);
}

.cx-std-point:nth-child(2) {
  border-top-color: var(--amber);
}

.cx-std-point:nth-child(3) {
  border-top-color: #8bb63c;
}

.cx-std-point:nth-child(4) {
  border-top-color: var(--ink-soft);
}

.cx-std-point:nth-child(4) .cx-std-word {
  color: var(--ink-soft);
}

.cx-std-point:nth-child(2) .cx-std-num,
.cx-std-point:nth-child(3) .cx-std-num {
  color: var(--line-strong);
}

/* "on an existing pull request" locator above the feedback card */

.cx-std-where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cx-std-where b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
}

.cx-std-where code {
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #bfe6ee;
  border-radius: 5px;
  color: var(--blue-deep);
  font-family: var(--mono);
  font-size: 0.66rem;
}
