/* KimQ Flow: cross-team flow board, document extraction card and the
   feature rows shared by the product pages. Loaded after products.css. */

/* ---------- Flow visual: board + document card ---------- */
.flow-visual {
  position: relative;
  /* The document card hangs below the board, overlapping only its edge. */
  padding: 0 0 212px;
  min-width: 0;
}
.fb {
  position: relative;
  padding: 18px;
  border: 1px solid #d3e0ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--glow);
}
.fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.fb-head small {
  display: block;
  color: #60758c;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
}
.fb-head strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.fb-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
  padding: 0;
  list-style: none;
}
.fb-track::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--good) 0 30%, #e0a53a 30% 45%, #dfe6ee 45%);
}
.fb-track li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}
.fb-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border: 2px solid #dfe6ee;
  border-radius: 50%;
  background: #fff;
  color: #8da0b4;
  font-size: 12px;
  font-weight: 800;
}
.fb-track li.is-done .fb-dot {
  border-color: var(--good);
  background: var(--good);
  color: #fff;
}
.fb-track li.is-stuck .fb-dot {
  border-color: #e0a53a;
  background: #fff6e3;
  color: var(--warn);
  box-shadow: 0 0 0 5px rgba(224, 165, 58, 0.18);
}
.fb-track b {
  font-size: 12.5px;
}
.fb-track small {
  color: #60758c;
  font-size: 10.5px;
  line-height: 1.35;
}
.fb-track li.is-stuck small {
  color: var(--warn);
  font-weight: 700;
}
.fb-sla {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f8fb;
  color: #50667d;
  font-size: 11.5px;
}
.fb-sla i {
  position: relative;
  height: 7px;
  border-radius: 4px;
  background: #e6ebf1;
  overflow: hidden;
}
.fb-sla i::before {
  content: "";
  position: absolute;
  inset: 0 33% 0 0;
  background: var(--viz-blue);
}
.fb-sla i::after {
  content: "";
  position: absolute;
  inset: 0 0 0 67%;
  background: #e0a53a;
}
.fb-sla b {
  color: var(--warn);
  font-size: 11.5px;
}
.fb-ai {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #dbe6f7;
  border-radius: 11px;
  background: linear-gradient(180deg, #f5f9ff, #fff);
}
.fb-ai p {
  margin: 0;
  color: #27405f;
  font-size: 12.5px;
  line-height: 1.55;
}
.doc-card {
  position: absolute;
  right: -14px;
  bottom: 0;
  width: min(330px, 76%);
  padding: 14px;
  border: 1px solid #d3e0ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 44px -26px rgba(15, 42, 74, 0.55);
}
.doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.doc-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 40px;
  border: 1px solid #d3e0ee;
  border-radius: 6px;
  background: repeating-linear-gradient(180deg, #fff 0 6px, #eef2f7 6px 7px);
  color: var(--blue);
}
.doc-thumb svg {
  width: 16px;
  height: 16px;
}
.doc-head small {
  display: block;
  color: #60758c;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
}
.doc-head strong {
  font-size: 13.5px;
}
.doc-card dl {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 11.5px;
}
.doc-card dl div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  padding: 3px 6px;
  border-radius: 5px;
}
.doc-card dl div:nth-child(odd) {
  background: #f6f8fb;
}
.doc-card dt {
  color: #60758c;
}
.doc-card dd {
  margin: 0;
  color: #22415f;
  font-weight: 650;
}
.doc-flag {
  display: flex;
  gap: 7px;
  margin: 10px 0 6px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff6e3;
  color: #6b4a06;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}
.doc-flag svg {
  width: 15px;
  height: 15px;
  color: var(--warn);
}
.doc-next {
  margin: 0;
  color: #50667d;
  font-size: 11px;
}
.doc-next b {
  color: var(--blue);
}

/* ---------- Flow band on the home page ---------- */
.flow-band {
  background: var(--canvas);
  border-top: 1px solid var(--line);
}
.flow-band .line-intro {
  background: none;
}
.flow-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.flow-points {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}
.flow-points li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.flow-points .layer-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d3e0ee;
  color: var(--blue);
}
.flow-points .layer-icon svg {
  width: 19px;
  height: 19px;
}
.flow-points strong {
  display: block;
  font-size: 15px;
}
.flow-points span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Feature rows (role packs, product modules) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.feature-row-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}
.feature-row-head h3 {
  font-size: 19px;
}
.feature-row-head p {
  margin: 0;
  font-size: 14px;
}
.feature {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.feature .layer-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue-wash);
  color: var(--blue);
}
.feature .layer-icon svg {
  width: 19px;
  height: 19px;
}
.feature h4 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.feature p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .flow-showcase {
    grid-template-columns: 1fr;
  }
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .flow-visual {
    padding: 0;
  }
  .doc-card {
    position: relative;
    right: auto;
    width: auto;
    margin: -12px 12px 0;
  }
  .fb-track {
    grid-template-columns: 1fr 1fr;
    row-gap: 16px;
  }
  .fb-track::before {
    display: none;
  }
  .fb-sla {
    grid-template-columns: 1fr auto;
  }
  .fb-sla i {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .feature-row {
    grid-template-columns: 1fr;
  }
}

.flow-showcase h2 + p {
  margin-top: 20px;
}
