/* AI quality guardrails: hero kicker, icon tiles, interactive guardrails catalog, four-up pillars, blog cards (matches /platform/ai-observability/evaluation-engine/) */
.qg-kicker { margin-bottom: 18px; font-family: var(--mono); font-size: 13px; color: var(--mint); }
.qg-em { color: var(--fg); font-weight: 500; }
.qg-hero-shot { max-width: 880px; }
.qg-hero-shot img { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.qg-ic { display: block; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 26px; }

/* ───── Guardrails catalog: type tabs, guardrail list, with/without chat panels ───── */
.qg-catalog { padding: 28px; }
.qg-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 28px; border-radius: 999px; background: var(--bg-1); border: 1px solid var(--line-2); }
.qg-tabs button { height: 38px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-2); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: color .2s, background .2s; }
.qg-tabs button:hover { color: var(--fg); }
.qg-tabs button[aria-selected="true"] { background: rgba(19,233,137,.14); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(19,233,137,.35); }
.qg-group { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; align-items: start; }
.qg-group[hidden] { display: none; }
.qg-list { display: flex; flex-direction: column; gap: 6px; }
.qg-item { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--fg-2); font: inherit; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.qg-item b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); }
.qg-item span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--fg-3); }
.qg-item:hover { background: rgb(var(--ink) / .03); }
.qg-item[aria-selected="true"] { background: rgba(19,233,137,.06); border-color: rgba(19,233,137,.3); }
.qg-item[aria-selected="true"] b { color: var(--mint); }
.qg-item[aria-selected="true"] span { color: var(--fg-2); }
.qg-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.qg-panel[hidden] { display: none; }
.qg-chat { display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: 14px; background: var(--bg-1); border: 1px solid var(--line-2); min-height: 340px; }
.qg-chat h4 { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.qg-chat h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.qg-with h4 { color: var(--accent); }
.qg-with h4::before { background: var(--accent); box-shadow: 0 0 10px rgba(19,233,137,.6); }
.qg-without h4 { color: #ff8a78; }
.qg-without h4::before { background: #ff6a55; }
.qg-msg { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.qg-msg p { padding: 11px 14px; font-size: 14px; line-height: 1.5; color: var(--fg); }
.qg-msg > span { font-size: 11.5px; color: var(--fg-3); }
.qg-msg > span b { font-weight: 500; color: var(--fg-2); margin-right: 8px; }
.qg-user { align-self: flex-end; align-items: flex-end; }
.qg-user p { border-radius: 14px 14px 4px 14px; background: rgb(var(--ink) / .07); }
.qg-user i { display: block; margin-bottom: 6px; color: var(--fg-2); }
.qg-ai { align-self: flex-start; }
.qg-ai p { border-radius: 14px 14px 14px 4px; }
.qg-with .qg-ai p { background: rgba(19,233,137,.08); box-shadow: inset 0 0 0 1px rgba(19,233,137,.28); }
.qg-without .qg-ai p { background: rgba(255,92,72,.08); box-shadow: inset 0 0 0 1px rgba(255,92,72,.28); }
.qg-ai code { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgb(0 0 0 / calc(.5 * var(--sh))); font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }

/* ───── Platform pillars ───── */
.qg-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.qg-pillars .persona { padding: 28px; }
.qg-pillars .persona h3 { font-size: 18px; }
.qg-pillars .persona p { font-size: 14.5px; }

/* ───── Blog cards ───── */
.qg-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.qg-post { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.qg-post-img { display: block; aspect-ratio: 1024 / 536; overflow: hidden; border-bottom: 1px solid var(--line-2); background: var(--bg-1); }
.qg-post-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qg-post-body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.qg-post-tag { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.qg-post h3 { margin-top: 14px; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.qg-post p { flex: 1; margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--fg-2); }
.qg-post-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; font-size: 13.5px; color: var(--fg-3); }
.qg-post-meta .link { font-size: 14px; }

/* final CTA stats: the number leads, as on the original */
.qg-facts span { font-family: inherit; font-size: clamp(32px, 3.4vw, 42px); line-height: 1; font-weight: 600; letter-spacing: -0.04em; text-transform: none; color: var(--accent); }
.qg-facts b { margin-top: 10px; color: var(--fg-2); }

@media (max-width: 1120px) {
  .qg-pillars { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .qg-group { grid-template-columns: minmax(0, 1fr); }
  /* guardrail list becomes a horizontal chip row */
  .qg-list { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: none; }
  .qg-list::-webkit-scrollbar { display: none; }
  .qg-item { flex: none; width: auto; padding: 10px 16px; border-color: var(--line-2); border-radius: 999px; }
  .qg-item b { font-size: 14px; white-space: nowrap; }
  .qg-item span { display: none; }
  .qg-chat { min-height: 0; }
  .qg-panel::before { content: attr(data-desc); grid-column: 1 / -1; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
}
@media (max-width: 960px) {
  .qg-posts { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .qg-catalog { padding: 18px; }
  .qg-tabs { display: flex; }
  .qg-tabs button { flex: 1; }
  .qg-panel { grid-template-columns: minmax(0, 1fr); }
  .qg-chat { min-height: 0; padding: 18px; }
}
@media (max-width: 560px) {
  .qg-pillars { grid-template-columns: minmax(0, 1fr); }
  .qg-post-body { padding: 22px; }
}

/* desktop: the chat pair fills the height of the guardrail list */
@media (min-width: 1121px) {
  .qg-group { align-items: stretch; }
  .qg-panels { display: flex; flex-direction: column; }
  .qg-panel { flex: 1; }
}
:root[data-theme="light"] .qg-without h4 { color: var(--red); }

/* Light skin: small green text uses --mint (≥4.5:1 on the light surfaces); --accent stays for dots, fills,
   borders and large numbers. Light only, so the dark skin is unchanged. */
:root[data-theme="light"] .qg-with h4,
:root[data-theme="light"] .qg-post-tag,
:root[data-theme="light"] /* final CTA stats: the number leads,
:root[data-theme="light"] as on the original */
.qg-facts span { color: var(--mint); }
