/* KimQ home sections: role values, cross-team example and security model.
   Loaded after flow.css on index.html. */

.point-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--blue-wash);
  color: var(--blue);
}
.point-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- Roles ---------- */
.roles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  align-items: stretch;
}
.role {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--edge);
}
.role-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.role-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blue-wash);
  color: var(--blue);
}
.role-icon svg {
  width: 23px;
  height: 23px;
}
.role-head small {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.role-head h3 {
  font-size: 22px;
  line-height: 1.3;
}
.role-demo {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #eef2f7;
}
.bubble {
  width: fit-content;
  max-width: 90%;
  padding: 9px 12px;
  border: 1px solid #d8dee6;
  border-radius: 4px 12px 12px;
  background: #fff;
  color: #27405f;
  font-size: 13px;
  line-height: 1.55;
}
.bubble b {
  display: block;
  margin-bottom: 2px;
  color: #456a92;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.bubble.is-me {
  justify-self: end;
  border-color: #cfe0fa;
  border-radius: 12px 4px 12px;
  background: #e6f1ff;
}
.role-points {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.role-points li {
  display: flex;
  gap: 12px;
}
.role-points strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.4;
}
.role-points span:not(.point-icon) {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.role.is-lead {
  border-color: #0f2942;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(42, 120, 214, 0.3), transparent 60%),
    #0f2942;
  box-shadow: var(--lift);
}
.role.is-lead h3,
.role.is-lead .role-points strong {
  color: #fff;
}
.role.is-lead .role-head small {
  color: #7db4ff;
}
.role.is-lead .role-points span:not(.point-icon) {
  color: #b9cde2;
}
.role.is-lead .role-icon,
.role.is-lead .point-icon {
  background: rgba(125, 180, 255, 0.14);
  color: #9fc8ff;
}
.role-demo.is-report {
  gap: 0;
  padding: 14px 16px;
  border: 1px solid #2a4a69;
  background: rgba(255, 255, 255, 0.05);
}
.mini-report-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a4a69;
  color: #fff;
  font-size: 13px;
}
.mini-report-head span {
  color: #9fb9d4;
  font-size: 11.5px;
}
.role-demo dl {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  font-size: 12.5px;
}
.role-demo dl div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
}
.role-demo dt {
  color: #9fb9d4;
}
.role-demo dd {
  margin: 0;
  color: #fff;
  font-weight: 650;
}
.role-demo dd.is-ask {
  color: #ffd27a;
}
.roles-bridge {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
}
.bridge-line {
  width: 2px;
  background: repeating-linear-gradient(180deg, #9cc0ec 0 5px, transparent 5px 10px);
}
.bridge-chip {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #c7daf3;
  border-radius: 14px;
  background: #fff;
  color: #2d4f73;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--edge);
}
.bridge-chip svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

/* ---------- Cross-team example ---------- */
.xteam {
  margin-top: 28px;
  padding: 30px;
  border-radius: 24px;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(42, 120, 214, 0.25), transparent 60%),
    #0f2942;
  color: #dbe7f4;
}
.xteam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}
.xteam-head .section-label {
  margin-bottom: 12px;
  color: #8fb1d2;
}
.xteam-head h3 {
  color: #fff;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
}
.xteam-head p {
  max-width: 52ch;
  margin: 12px 0 0;
  color: #b9cde2;
  font-size: 14.5px;
  line-height: 1.7;
}
.xteam-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 14px 18px;
  border: 1px solid #6b4f1d;
  border-radius: 16px;
  background: rgba(237, 161, 0, 0.1);
}
.xteam-stat b {
  color: #ffc861;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.xteam-stat span {
  color: #f1dcb3;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}
.xteam-chain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.xteam-team {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid #2a4a69;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}
.team-sys {
  color: #9fb9d4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.xteam-team p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
}
.team-status {
  width: fit-content;
  margin-top: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
}
.team-status.is-ok {
  background: rgba(40, 180, 130, 0.16);
  color: #6fe0b2;
}
.team-status.is-wait {
  background: rgba(237, 161, 0, 0.16);
  color: #ffc861;
}
.xteam-break {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: #f28b82;
  font-size: 10.5px;
  font-weight: 750;
  text-align: center;
}
.xteam-break::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  right: 6px;
  z-index: 0;
  border-top: 2px dashed rgba(242, 139, 130, 0.55);
}
.xteam-break svg,
.xteam-break span {
  position: relative;
  z-index: 1;
}
.xteam-break svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border: 1px solid rgba(242, 139, 130, 0.5);
  border-radius: 50%;
  background: #0f2942;
}
.xteam-break span {
  padding: 0 4px;
  background: #0f2942;
}
.xteam-fix {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 24px;
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
}
.xteam-fix-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.xteam-fix-head .brand-mark,
.xteam-fix-head .brand-mark svg {
  width: 40px;
  height: 40px;
}
.xteam-fix-head small {
  display: block;
  color: #50667d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.xteam-fix-head strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.xteam-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.xteam-steps li {
  display: flex;
  gap: 10px;
}
.xteam-steps b {
  display: block;
  font-size: 14px;
}
.xteam-steps span:not(.point-icon) {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.xteam-note {
  margin: 14px 0 0;
  color: #8fa9c4;
  font-size: 11.5px;
}

/* ---------- Security model ---------- */
.sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.sec-layer {
  position: relative;
  padding: 44px 18px 18px;
  border-radius: 26px;
}
.sec-layer.l1 {
  border: 1px solid #2c4d6c;
  background: rgba(255, 255, 255, 0.03);
}
.sec-layer.l2 {
  border: 1px solid #36618a;
  background: rgba(42, 120, 214, 0.08);
}
.sec-layer.l3 {
  border: 1px solid #4a86c8;
  background: rgba(42, 120, 214, 0.14);
}
.sec-tag {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9cde2;
  font-size: 12px;
  font-weight: 700;
}
.sec-tag svg {
  width: 16px;
  height: 16px;
  color: #7db4ff;
}
.sec-core {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, #2a86ff, #0a43b4);
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 40px -24px rgba(10, 67, 180, 0.9);
}
.sec-core svg {
  width: 30px;
  height: 30px;
}
.sec-core strong {
  font-size: 17px;
}
.sec-core small {
  color: #d6e6ff;
  font-size: 12px;
}
.sec-principles {
  display: grid;
  gap: 14px;
}
.sec-principles article {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid #2c4d6c;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}
.sec-principles .point-icon {
  background: rgba(125, 180, 255, 0.14);
  color: #9fc8ff;
}
.sec-principles h3 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 16px;
}
.sec-principles p {
  margin: 0;
  color: #b3c6d6;
  font-size: 13.5px;
  line-height: 1.65;
}
.sec-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #9fc8ff;
  font-size: 14px;
  font-weight: 700;
}
.sec-cta:hover {
  color: #fff;
}
.sec-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid #2c4d6c;
}
.sec-controls article {
  display: grid;
  gap: 8px;
  align-content: start;
}
.control-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border: 1px solid #36618a;
  border-radius: 12px;
  color: #9fc8ff;
}
.control-icon svg {
  width: 19px;
  height: 19px;
}
.sec-controls strong {
  color: #fff;
  font-size: 15px;
}
.sec-controls p {
  margin: 0;
  color: #b3c6d6;
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .roles {
    grid-template-columns: 1fr;
  }
  .roles-bridge {
    grid-template-rows: none;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 0;
  }
  .bridge-line {
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(90deg, #9cc0ec 0 5px, transparent 5px 10px);
  }
  .bridge-chip br {
    display: none;
  }
  .xteam-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .xteam-chain {
    grid-template-columns: 1fr;
  }
  .xteam-break {
    grid-auto-flow: column;
    padding: 8px 0;
  }
  .xteam-break::before {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    border-top: 0;
    border-left: 2px dashed rgba(242, 139, 130, 0.55);
  }
  .xteam-fix {
    grid-template-columns: 1fr;
  }
  .sec-grid {
    grid-template-columns: 1fr;
  }
  .sec-controls {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .role,
  .xteam {
    padding: 20px;
  }
  .xteam-steps,
  .sec-controls {
    grid-template-columns: 1fr;
  }
  .sec-layer {
    padding: 42px 12px 12px;
    border-radius: 20px;
  }
  .sec-tag {
    left: 12px;
    right: 12px;
    font-size: 11.5px;
  }
}

/* Nhóm Zalo cộng đồng (KQ-20261020-005) */
.button.zalo-join {
  gap: 10px;
  min-height: 48px;
}
.button.zalo-join svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-actions .zalo-join {
  background: white;
  border-color: #c9d5e2;
  color: var(--ink);
}
.hero-actions .zalo-join:hover {
  background: var(--pale);
  border-color: #91abc7;
}
.zalo-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 48px;
  margin-bottom: 24px;
  background: white;
  border: 1px solid #dbe6f3;
  border-radius: 16px;
}
.zalo-group-copy {
  min-width: 0;
  max-width: 620px;
}
.zalo-group h2 {
  font-size: 30px;
  line-height: 1.25;
}
.zalo-group p {
  margin: 16px 0 24px;
  font-size: 15px;
  line-height: 1.75;
  color: #40627f;
}
.zalo-group-qr {
  flex: none;
  margin: 0;
  text-align: center;
}
.zalo-group-qr img {
  display: block;
  width: 148px;
  height: 148px;
  padding: 8px;
  background: white;
  border: 1px solid #dbe6f3;
  border-radius: 12px;
}
.zalo-group-qr figcaption {
  max-width: 150px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #40627f;
}
@media (max-width: 700px) {
  .zalo-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 28px;
    margin-bottom: 20px;
  }
  .zalo-group h2 {
    font-size: 25px;
  }
  .zalo-group p {
    font-size: 14px;
  }
  .zalo-group .button {
    width: 100%;
  }
  /* Trên điện thoại bấm nút là mở thẳng Zalo; QR chỉ để quét từ máy tính */
  .zalo-group-qr {
    display: none;
  }
}
