/* ==========================================================================
   kb.css — the knowledge base (/knowledge)
   ========================================================================== */

.kb-hero {
  text-align: center;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) var(--space-8);
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(91, 52, 240, 0.10), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg-alt) 100%);
}
.kb-hero h1 { font-size: var(--fs-hero); margin-top: var(--space-3); }
.kb-hero .lead { margin-top: var(--space-4); }

/* The "what was actually tested" note. Deliberately prominent, not a footnote. */
.kb-note {
  display: inline-block;
  margin-top: var(--space-5);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  max-width: 62ch;
}

.kb-group-title {
  font-size: var(--fs-h3);
  margin-top: var(--space-8);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.kb-group-title:first-child { margin-top: 0; }

/* ---- Cards ---------------------------------------------------------------- */
.kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 1000px) { .kb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .kb-grid { grid-template-columns: 1fr; } }

.kb-card {
  display: flex; flex-direction: column;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.kb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kb-card__head { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.kb-card h3 { font-size: 1.05rem; line-height: 1.35; color: var(--color-text); margin: 0; }
.kb-card p {
  margin-top: 8px;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: none;      /* the global p{max-width:65ch} narrows it oddly in a grid cell */
}
.kb-card__more {
  margin-top: auto; padding-top: var(--space-4);
  font-size: var(--fs-small); font-weight: var(--fw-semibold);
  color: var(--color-accent);
}
.kb-card:hover .kb-card__more { color: var(--color-primary); }

/* ---- The "tested" badge ----------------------------------------------------
   A factual claim: this feature was actually run. It should look like a fact,
   not like decoration. */
.kb-badge {
  flex: none;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.kb-badge--ran { background: #e6f6ee; color: #1f7a4d; }
.kb-badge--ui  { background: var(--color-bg-alt); color: var(--color-text-muted); }

/* ---- Article --------------------------------------------------------------- */
.kb-article-hero {
  padding-block: var(--space-8) var(--space-6);
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg-alt) 100%);
}
.kb-article-hero h1 { font-size: var(--fs-h1); margin-top: var(--space-3); }
.kb-article-hero .lead { margin-top: var(--space-3); }
.kb-verified {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  max-width: 70ch;
}

/* Screenshots are full-page captures and can be very tall. Cap the height and let
   the top of the screen do the work — past ~700px you are scrolling, not reading. */
.kb-shot {
  margin: 0 0 var(--space-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
}
.kb-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  object-position: top;     /* the useful part of a UI screenshot is the top */
}
.kb-shot figcaption {
  padding: 10px var(--space-4);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.kb-body { max-width: 74ch; }
.kb-body h2 { font-size: 1.45rem; margin-top: var(--space-7); margin-bottom: var(--space-3); }
.kb-body p, .kb-body li { line-height: 1.75; }
.kb-body ul, .kb-body ol { margin: var(--space-4) 0 var(--space-4) 1.35rem; }
.kb-body ul { list-style: disc; }
.kb-body ol { list-style: decimal; }
.kb-body li { margin-bottom: 8px; }
.kb-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--color-bg-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ---- The product CTA at the foot -------------------------------------------- */
.kb-product {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.kb-product__eyebrow {
  font-size: 0.7rem; font-weight: var(--fw-bold); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-accent); margin: 0;
}
.kb-product h2 { font-size: 1.35rem; margin: 6px 0 4px; }
.kb-product p { margin: 0; color: var(--color-text-muted); font-size: var(--fs-small); }
@media (max-width: 760px) { .kb-product { flex-direction: column; align-items: flex-start; } }
