/* /agents and /agents/<question>.

   Only what site.css does not already have: the console in the hero, the
   three steps, the promises, the question library with its topic filter, the
   endpoint list, and the plain article the question pages use. Colours, type
   and radii come from the site.css tokens, so these pages read as the same site. */

.ag-hero h1, .ag-page .section-head h2 { text-wrap: balance; }

/* Code in this page is short URLs; one face for all of it. */
.ag-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  color: var(--ink); overflow-wrap: anywhere;
}

/* ---------- hero: the console ---------- */
.ag-console {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 60px -36px rgba(43,69,95,0.45);
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.ag-ask-label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.ag-ask-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #cfdde6; border-radius: 12px; padding: 6px 6px 6px 14px; color: var(--ink-faint);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ag-ask-row:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px rgba(46,166,245,0.18); }
.ag-ask-row input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 16px/1.4 var(--font-body); color: var(--ink); padding: 8px 0;
}
.ag-ask-row input::-webkit-search-cancel-button { display: none; }
.ag-ask-go {
  flex: none; border: 0; border-radius: 9px; padding: 10px 18px; cursor: pointer;
  background: var(--ink); color: #fff; font: 600 14px/1 var(--font-display);
  transition: background 0.15s ease;
}
.ag-ask-go:hover { background: #1f3549; }
.ag-ask-go:focus-visible, .ag-chip:focus-visible, .ag-topic:focus-visible, .ag-copy:focus-visible {
  outline: 2px solid var(--action); outline-offset: 2px;
}

.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chip {
  border: 1px solid var(--line); background: var(--bg-wash); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 12px; font: 600 13px/1.2 var(--font-body); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ag-chip:hover { border-color: #b9cfdc; color: var(--ink); }
.ag-chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: #fff; }

.ag-request {
  display: flex; align-items: baseline; gap: 10px; min-width: 0;
  padding: 10px 12px; border-radius: 10px; background: var(--bg-wash);
}
.ag-request code { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-method {
  flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700;
  color: #0f7a4f; background: #e3f6ed; border-radius: 6px; padding: 3px 7px; letter-spacing: 0.02em;
}
.ag-method.is-post { color: var(--action-deep); background: #e8effc; }

/* Results hold their height, so the hero does not jump as answers arrive. */
.ag-results { min-height: 380px; display: flex; flex-direction: column; gap: 12px; }
.ag-empty, .ag-status { font-size: 14.5px; color: var(--ink-faint); padding: 8px 2px; }

.ag-people { background: var(--band); border-radius: 14px; padding: 16px 16px 8px; color: var(--band-text); }
.ag-people-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ag-people-top b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; }
.ag-people-top a { font-size: 13px; color: #9fd4fb; white-space: nowrap; }
.ag-person {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.12);
}
.ag-person:first-of-type { border-top: 0; }
.ag-avatar {
  grid-row: span 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,0.12);
  font: 600 14px/1 var(--font-display); color: #fff;
}
.ag-person-name { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: #fff; }
.ag-person-name span { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: #a8bacb; margin-left: 6px; }
.ag-person-line { font-size: 13px; line-height: 1.45; color: var(--band-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ag-answer { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ag-answer h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 6px; }
.ag-answer h3 a { color: var(--ink); text-decoration: none; }
.ag-answer h3 a:hover { color: var(--action-deep); text-decoration: underline; }
.ag-answer p {
  font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ag-answer .ag-src { display: block; margin-top: 8px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- how it works ---------- */
.ag-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ag-step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 10px;
}
.ag-step-n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #cfdde6; font: 600 14px/1 var(--font-display); color: var(--ink);
}
.ag-step h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ag-step p { font-size: 15px; }
.ag-call {
  margin-top: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--bg-wash);
}
.ag-call code { font-size: 12.5px; line-height: 1.5; }

.ag-copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 8px;
  padding: 6px 9px; font: 600 12.5px/1 var(--font-body); cursor: pointer; min-height: 32px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ag-copy:hover { border-color: #b9cfdc; color: var(--ink); }
.ag-copy.is-done { color: #0f7a4f; border-color: #bfe6d2; }

/* ---------- promises ---------- */
.ag-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.ag-promise { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.ag-promise-icon { color: var(--ink); }
.ag-promise h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ag-promise p { font-size: 15.5px; max-width: 38ch; }

/* ---------- question library ---------- */
.ag-library { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.ag-topics { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 110px; }
.ag-topic {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  border: 0; background: transparent; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font: 600 14.5px/1.3 var(--font-body); color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.ag-topic span { font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.ag-topic:hover { color: var(--ink); background: rgba(43,69,95,0.05); }
.ag-topic[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ag-topic[aria-pressed="true"] span { color: var(--action-deep); }

.ag-groups { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 28px; }
.ag-group { padding: 22px 0; border-top: 1px solid var(--line); }
.ag-group:first-child { border-top: 0; }
.ag-group[hidden] { display: none; }
.ag-group h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }
.ag-group ul { list-style: none; columns: 2; column-gap: 36px; }
.ag-group li { break-inside: avoid; padding: 5px 0; }
.ag-group a { color: var(--ink-soft); text-decoration: none; font-size: 15px; line-height: 1.45; }
.ag-group a:hover { color: var(--action-deep); text-decoration: underline; }

/* ---------- endpoints ---------- */
.ag-dev { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.ag-dev .section-head { margin-bottom: 0; }
.ag-endpoints { list-style: none; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ag-endpoint {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 70px auto; gap: 14px; align-items: center;
  padding: 13px 16px; border-top: 1px solid var(--line);
}
.ag-endpoint:first-child { border-top: 0; }
.ag-endpoint-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.ag-endpoint code { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
.ag-endpoint-type { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- question pages ---------- */
.ag-article { padding: 150px 0 24px; }
.ag-article-body { max-width: 720px; }
.ag-crumb { font-size: 14px; color: var(--ink-faint); margin-bottom: 14px; }
.ag-crumb a { color: inherit; }
.ag-article h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.12; margin-bottom: 22px; }
.ag-article-body > p { font-size: 1.06rem; margin-bottom: 14px; }
.ag-article h2 { font-size: 1.3rem; font-weight: 600; margin: 44px 0 12px; }
.ag-links, .ag-related { padding-left: 20px; margin-bottom: 14px; }
.ag-links li, .ag-related li { margin: 6px 0; }
.ag-article-body a { color: var(--action-deep); }
.ag-article .source { font-size: 14px; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px; }
.ag-next { margin: 28px 0 8px; padding: 18px 20px; border-radius: 12px; background: var(--bg-wash); border: 1px solid var(--line); }
.ag-next p { font-size: 15px; }
.ag-next code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .ag-steps { grid-template-columns: minmax(0, 1fr); }
  .ag-dev { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 900px) {
  .ag-library { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ag-topics { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .ag-topic { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; }
  .ag-promises { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ag-promise { padding: 22px 0; }
}
@media (max-width: 640px) {
  .ag-console { padding: 16px; border-radius: 14px; }
  .ag-results { min-height: 0; }
  .ag-group ul { columns: 1; }
  .ag-groups { padding: 4px 18px; }
  .ag-endpoint { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ag-endpoint-name { grid-column: 1; }
  .ag-endpoint code { grid-column: 1; grid-row: 2; }
  .ag-endpoint-type { display: none; }
  .ag-endpoint .ag-copy { grid-column: 2; grid-row: 1 / span 2; }
  .ag-copy span { display: none; }
  .ag-article { padding: 120px 0 16px; }
}

/* "Your agent" is longer than the homepage's "Your team"; keep it on one line on small phones. */
.ag-page .closing-duo-team { white-space: nowrap; }
