/* ==========================================================================
   agents.css — myzone.ai Agents directory (CHG-0020)
   Index (pages/agents.html) + agent detail (pages/agents/<slug>.html).
   Loads AFTER css/style.css and only uses its tokens (--primary, --dark,
   --grey-*, --radius-*, --section-gap, --font-heading/--font-body …).
   No new fonts. All classes are prefixed `ag-` so nothing leaks site-wide.
   Department colours mirror DEPARTMENTS in generator/agents/agent_art.py.
   ========================================================================== */

:root {
  --ag-accent: var(--primary);
  --ag-accent-ink: var(--primary);
  --ag-card-border: rgba(51, 97, 255, 0.10);
  --ag-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --ag-shadow-hover: 0 12px 32px rgba(28, 45, 138, 0.12);
  --ag-focus: 0 0 0 3px rgba(51, 97, 255, 0.35);
  --ag-filter-top: 80px; /* height of the sticky site nav */
}

/* ----- Department colour families (tile colour / ink on 10% tint) ----- */
.dept-marketing            { --ag-accent: #C4501A; --ag-accent-ink: #9E3F12; }
.dept-sales                { --ag-accent: #15803D; --ag-accent-ink: #11652F; }
.dept-finance              { --ag-accent: #0A4563; --ag-accent-ink: #0A4563; }
.dept-operations           { --ag-accent: #3651DA; --ag-accent-ink: #3651DA; }
.dept-leadership-strategy  { --ag-accent: #1C2D8A; --ag-accent-ink: #1C2D8A; }
.dept-web-digital          { --ag-accent: #2D55E6; --ag-accent-ink: #2D55E6; }
.dept-legal-compliance     { --ag-accent: #B2153D; --ag-accent-ink: #B2153D; }
.dept-research-analytics   { --ag-accent: #0D5A7A; --ag-accent-ink: #0D5A7A; }
.dept-learning-development { --ag-accent: #5B4FD6; --ag-accent-ink: #5B4FD6; }
.dept-product-engineering  { --ag-accent: #0F766E; --ag-accent-ink: #0F766E; }
.dept-customer-support     { --ag-accent: #BE3A34; --ag-accent-ink: #A8322D; }

/* ----- Shared primitives ----- */
.ag-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ag-page a:focus-visible,
.ag-page button:focus-visible,
.ag-page input:focus-visible,
.ag-page select:focus-visible,
.ag-page summary:focus-visible { outline: none; box-shadow: var(--ag-focus); border-radius: var(--radius); }

.agent-art { display: block; flex-shrink: 0; border-radius: 22%; }

.ag-dept-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.65rem; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ag-accent-ink);
  background: #f1f3f8; /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--ag-accent) 10%, #fff);
  white-space: nowrap;
}
.ag-dept-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ag-accent);
}
.ag-tag {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: var(--radius);
  background: var(--grey-150); color: var(--grey-300);
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}

.ag-section { padding: var(--section-gap) 0; }
.ag-section--light { background: var(--blue-light); }
.ag-section--tint { background: #eef2ff; }
.ag-section-head { margin-bottom: 2rem; max-width: 720px; }
.ag-section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.ag-section-head h2 { font-size: 1.8rem; color: var(--dark); margin-bottom: 0.5rem; }
.ag-section-head p { color: var(--grey-300); font-size: 0.95rem; line-height: 1.6; }

.ag-icon-box {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ag-accent) 8%, #fff);
  color: var(--ag-accent);
}

/* ----- Buttons (extends site .btn) ----- */
.ag-btn-ghost {
  background: rgba(255, 255, 255, 0.1); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.ag-btn-ghost:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }

/* ==========================================================================
   HERO (both page types) — keeps the automation pages' .hero.hero-grid-pattern
   ========================================================================== */
.ag-hero { padding: 4.5rem 0 4rem; }
.ag-hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
}
.ag-hero p.section-label {
  font-size: 0.75rem; line-height: 1.4;
  display: inline-block; padding: 0.3rem 0.75rem; border-radius: 100px;
  color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18); margin-bottom: 1rem;
}
.ag-hero h1 { font-size: 2.8rem; line-height: 1.12; margin-bottom: 1rem; }
.ag-hero .ag-hero-sub { font-size: 1.075rem; color: rgba(255, 255, 255, 0.85); max-width: 540px; line-height: 1.6; margin-bottom: 2rem; }
.ag-hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.ag-hero-pills { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2rem; list-style: none; }
.ag-hero-pills li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2rem; padding: 0.4rem 0.9rem;
  font-size: 0.75rem; font-weight: 500; color: rgba(255, 255, 255, 0.85);
}

.ag-breadcrumb { margin-bottom: 1.5rem; font-size: 0.8rem; }
.ag-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; color: rgba(255, 255, 255, 0.7); }
.ag-breadcrumb li + li::before { content: '/'; margin-right: 0.4rem; color: rgba(255, 255, 255, 0.45); }
.ag-breadcrumb a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.ag-breadcrumb a:hover { color: #fff; text-decoration-color: #fff; }
.ag-breadcrumb [aria-current] { color: #fff; font-weight: 600; }

/* Index hero visual — a wall of real agent tiles (deterministic art) */
.ag-hero-wall {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  max-width: 420px; margin-left: auto; list-style: none;
}
.ag-hero-wall li {
  aspect-ratio: 1; border-radius: 22%;
  box-shadow: 0 12px 30px rgba(10, 20, 80, 0.35);
}
.ag-hero-wall li:nth-child(odd) { transform: translateY(12px); }
.ag-hero-wall .agent-art { width: 100%; height: 100%; }

/* Detail hero visual — the agent profile card (inspired by the portal "Agents Home" identity card) */
.ag-profile {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl); overflow: hidden; color: #fff;
  box-shadow: 0 30px 60px rgba(10, 20, 80, 0.3);
}
.ag-profile-banner { height: 112px; position: relative; }
.ag-profile-banner .agent-banner { width: 100%; height: 100%; display: block; }
.ag-profile-body { padding: 0 1.75rem 1.5rem; }
.ag-profile-id { display: flex; align-items: flex-end; gap: 1rem; margin-top: -48px; margin-bottom: 1.25rem; position: relative; }
.ag-profile-id > div { padding-bottom: 0.1rem; min-width: 0; }
/* site rule `.hero p` (1.125rem + 2rem margin) must not leak into the card */
.ag-hero .ag-profile p { margin: 0; font-size: inherit; line-height: 1.4; color: inherit; }
.ag-profile-id .agent-art { width: 96px; height: 96px; box-shadow: 0 0 0 4px #2a3db4, 0 10px 24px rgba(0, 0, 0, 0.3); }
.ag-hero .ag-profile .ag-profile-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.ag-hero .ag-profile .ag-profile-dept { font-size: 0.8rem; color: rgba(255, 255, 255, 0.75); margin-top: 0.15rem; }
.ag-profile dl { display: grid; gap: 0.9rem; }
.ag-profile dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: rgba(255, 255, 255, 0.6); margin-bottom: 0.4rem; }
.ag-profile dd { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ag-chip-dark {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem; font-weight: 600;
}
.ag-hero .ag-profile .ag-profile-foot {
  display: flex; align-items: center; gap: 0.6rem;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem; color: rgba(255, 255, 255, 0.85);
}
.ag-profile-foot svg { color: #4ade80; flex-shrink: 0; }

/* ==========================================================================
   INDEX — filter bar
   ========================================================================== */
.ag-filterbar {
  position: sticky; top: var(--ag-filter-top); z-index: 50;
  background: #fff; border-bottom: 1px solid var(--grey-200);
  padding: 1rem 0; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03);
}
.ag-no-js .ag-filterbar { display: none; }        /* no JS => full list, no dead controls */
.ag-filterbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.ag-filterbar-row + .ag-filterbar-row { margin-top: 0.75rem; }

.ag-search { position: relative; flex: 1 1 320px; max-width: 480px; }
.ag-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--grey-300); pointer-events: none; }
.ag-search input {
  width: 100%; padding: 0.7rem 1rem 0.7rem 2.75rem;
  border: 1px solid var(--grey-200); border-radius: var(--radius-lg);
  font: 400 0.9rem var(--font-body); color: var(--dark); background: var(--grey-100);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ag-search input::placeholder { color: #767980; }
.ag-search input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: var(--ag-focus); }

/* Department chips — reuse the automations pill look */
.ag-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.ag-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.9rem; border-radius: 100px;
  border: 1px solid var(--grey-200); background: #fff;
  font: 600 0.8rem var(--font-body); color: var(--grey-300);
  white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ag-chip:hover { border-color: var(--primary); color: var(--primary); }
.ag-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.ag-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ag-accent); }
.ag-chip[aria-pressed="true"] .ag-chip-dot { background: #fff; }
.ag-chip-count {
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; background: rgba(0, 0, 0, 0.06);
}
/* QA v1 M1: white pill + dark text on the active chip (the old white-on-#6689ff was 3.18:1) */
.ag-chip[aria-pressed="true"] .ag-chip-count { background: #fff; color: var(--dark); }
.ag-chip[data-count="0"]:not([aria-pressed="true"]),
.ag-chip[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* Multi-select dropdowns (native <details>, checkbox list) */
.ag-dd { position: relative; }
.ag-dd > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.9rem; border: 1px solid var(--grey-200); border-radius: var(--radius-lg);
  font: 600 0.82rem var(--font-body); color: var(--dark); background: #fff;
}
.ag-dd > summary::-webkit-details-marker { display: none; }
.ag-dd > summary::after {
  content: ''; width: 8px; height: 8px; margin-left: 0.15rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.ag-dd[open] > summary { border-color: var(--primary); }
.ag-dd[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.ag-dd-badge {
  display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 0.7rem; align-items: center; justify-content: center;
}
.ag-dd.has-value .ag-dd-badge { display: inline-flex; }
.ag-dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 280px; max-height: 340px; overflow: auto;
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12); padding: 0.5rem;
}
.ag-dd-panel fieldset { border: 0; }
.ag-dd-filter {
  width: 100%; margin: 0.25rem 0 0.5rem; padding: 0.5rem 0.7rem;
  border: 1px solid var(--grey-200); border-radius: var(--radius);
  font: 400 0.82rem var(--font-body);
}
.ag-opt {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.5rem; border-radius: var(--radius);
  font-size: 0.85rem; color: var(--dark); cursor: pointer;
}
.ag-opt:hover { background: var(--blue-light); }
.ag-opt[hidden] { display: none; }
.ag-opt input { width: 16px; height: 16px; accent-color: var(--primary); }
.ag-opt-count { margin-left: auto; font-size: 0.72rem; color: var(--grey-300); font-weight: 600; }
.ag-opt.is-empty { color: #8a8d93; }

.ag-sort { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--grey-300); font-weight: 600; }
.ag-sort select {
  padding: 0.5rem 0.75rem; border: 1px solid var(--grey-200); border-radius: var(--radius-lg);
  font: 600 0.82rem var(--font-body); color: var(--dark); background: #fff;
}
.ag-count { font-size: 0.85rem; color: var(--grey-300); }
.ag-count strong { color: var(--dark); }
.ag-clear {
  background: none; padding: 0.35rem 0.5rem; font: 600 0.8rem var(--font-body);
  color: var(--primary); text-decoration: underline; text-underline-offset: 3px;
}
.ag-clear[hidden] { display: none; }

.ag-active { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.ag-active:empty { display: none; }
.ag-active button {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.4rem 0.25rem 0.65rem; border-radius: 100px;
  background: var(--blue-light); border: 1px solid rgba(51, 97, 255, 0.2);
  font: 600 0.75rem var(--font-body); color: var(--primary);
}
.ag-active button span[aria-hidden] { font-size: 0.95rem; line-height: 1; }

/* ==========================================================================
   INDEX — card grid (designed for 25 → 500 cards)
   ========================================================================== */
.ag-results { padding: 2rem 0 var(--section-gap); scroll-margin-top: calc(var(--ag-filter-top) + 150px); }
.ag-no-js .ag-results { scroll-margin-top: var(--ag-filter-top); }
.ag-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; list-style: none;
}
.ag-grid > li { display: flex; }
#ag-flat[hidden] { display: none; }
/* department groups — default "By department" order, one H2 each (SEO-SPEC §2.3.2) */
.ag-group { scroll-margin-top: calc(var(--ag-filter-top) + 24px); }
.ag-group[hidden] { display: none; }
.ag-group + .ag-group { margin-top: 3rem; }
.ag-group-title {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem;
  font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; color: var(--dark);
}
.ag-group-title .ag-chip-dot { width: 10px; height: 10px; }
.ag-group-count {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; color: var(--grey-300);
  background: var(--grey-100); border-radius: 999px; padding: 0.15rem 0.55rem;
}
/* intro ¶2–¶3 under the hero (SEO-SPEC §2.2) */
.ag-intro { padding: 2rem 0 0.5rem; }
.ag-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.ag-intro p { color: var(--grey-300); font-size: 0.98rem; line-height: 1.7; }
.ag-intro p strong { color: var(--dark); }
.ag-intro a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ag-grid > li[hidden] { display: none; }
.ag-card {
  position: relative; display: flex; flex-direction: column; width: 100%;
  background: #fff; border: 1px solid var(--ag-card-border); border-radius: var(--radius-xl);
  padding: 1.5rem; box-shadow: var(--ag-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ag-card:hover { transform: translateY(-3px); box-shadow: var(--ag-shadow-hover); border-color: color-mix(in srgb, var(--ag-accent) 35%, #fff); }
.ag-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.ag-card-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.4rem; }
.ag-card-title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-xl); } /* whole card clickable, one link */
.ag-card-title a:focus-visible { box-shadow: none; }
.ag-card-sub { font-size: 0.85rem; font-weight: 600; line-height: 1.4; color: var(--grey-300); margin: -0.2rem 0 0.4rem; } /* CHG-0023 fix round: optional keyword line */
.ag-card:focus-within { box-shadow: var(--ag-focus), var(--ag-shadow); }
.ag-card-text {
  color: var(--grey-300); font-size: 0.9rem; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ag-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem; list-style: none; }
.ag-card-more { margin-top: 1rem; font-size: 0.85rem; font-weight: 700; color: var(--primary); }

.ag-empty { text-align: center; padding: 4rem 1rem; max-width: 520px; margin: 0 auto; }
.ag-empty[hidden] { display: none; }
/* stale-link error state (unknown ?dept=/?cap=/?int= values were dropped) — #9F1239 on #FFF1F2 = 7.2:1 */
.ag-notice { margin: .75rem 0 0; padding: .625rem .875rem; border-radius: var(--radius-sm, 8px); font-size: .875rem; line-height: 1.5; }
.ag-notice.is-error { color: #9F1239; background: #FFF1F2; border: 1px solid #FECDD3; }
.ag-notice[hidden] { display: none; }
.ag-empty .ag-icon-box { margin: 0 auto 1rem; }
.ag-empty h2 { font-size: 1.3rem; color: var(--dark); margin-bottom: 0.5rem; }
.ag-empty p { color: var(--grey-300); margin-bottom: 1.25rem; }

/* Index "how it works" + FAQ tiles */
.ag-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; list-style: none; }
.ag-how li { text-align: center; }
.ag-how .ag-icon-box { margin: 0 auto 1rem; }
.ag-how h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--dark); }
.ag-how p { color: var(--grey-300); font-size: 0.95rem; }
.ag-faq-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.ag-faq-tile { background: #fff; border-radius: var(--radius-xl); padding: 1.5rem; border: 1px solid var(--ag-card-border); }
.ag-faq-tile h3 { font-size: 1rem; color: var(--dark); margin-bottom: 0.5rem; }
.ag-faq-tile p { font-size: 0.9rem; color: var(--grey-300); line-height: 1.6; }

/* ==========================================================================
   DETAIL — sections
   ========================================================================== */
/* Outcomes strip, sits directly under the hero */
.ag-outcomes { border-bottom: 1px solid var(--grey-200); background: #fff; }
.ag-outcomes-grid { display: grid; grid-template-columns: repeat(var(--ag-cols, 4), 1fr); list-style: none; }
.ag-outcome { padding: 2rem 1.5rem; border-left: 1px solid var(--grey-200); }
.ag-outcome:first-child { border-left: 0; padding-left: 0; }
.ag-outcome-label {
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--dark);
  margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem;
}
.ag-outcome-label::before { content: ''; width: 4px; height: 1.1em; border-radius: 2px; background: var(--ag-accent); flex-shrink: 0; }
.ag-outcome p { font-size: 0.88rem; color: var(--grey-300); line-height: 1.55; }

/* What it does — feature cards (seo-audit "What … Covers" pattern) */
.ag-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; list-style: none; }
.ag-feature {
  background: #fff; border: 1px solid #f0f0f0; border-radius: var(--radius-xl);
  padding: 1.75rem; box-shadow: var(--ag-shadow); display: flex; flex-direction: column; gap: 1rem;
}
.ag-feature h3 { font-size: 1.05rem; color: var(--dark); }
.ag-feature p { font-size: 0.9rem; color: var(--grey-300); line-height: 1.6; }

/* How it works — numbered steps, approval step highlighted */
.ag-steps { display: grid; grid-template-columns: repeat(var(--ag-steps, 4), 1fr); gap: 1.25rem; list-style: none; counter-reset: agstep; }
.ag-step {
  position: relative; background: #fff; border: 1px solid #eef0f4; border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.ag-step-num {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; margin-bottom: 0.9rem;
}
.ag-step h3 { font-size: 1rem; color: var(--dark); margin-bottom: 0.4rem; }
.ag-step p { font-size: 0.88rem; color: var(--grey-300); line-height: 1.55; }
.ag-step.is-approval { border: 2px solid #22c55e; background: #f3fcf6; }
.ag-step.is-approval .ag-step-num { background: #15803D; }
.ag-approval-badge {
  position: absolute; top: -11px; right: 1rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #15803D; color: #fff; border-radius: 100px; padding: 0.2rem 0.6rem;
  font-size: 0.7rem; font-weight: 700;
}

/* Use cases — "You … / It …" rows */
.ag-usecases { list-style: none; border: 1px solid var(--grey-200); border-radius: var(--radius-xl); overflow: hidden; background: #fff; }
.ag-usecase { display: grid; grid-template-columns: 1fr 1fr; }
.ag-usecase + .ag-usecase { border-top: 1px solid var(--grey-200); }
.ag-usecase > div { padding: 1.1rem 1.5rem; font-size: 0.92rem; line-height: 1.55; }
.ag-usecase-q { color: var(--dark); font-weight: 600; background: var(--grey-100); }
.ag-usecase-a { color: var(--grey-300); }
.ag-usecase-head > div { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--grey-300); padding-top: 0.75rem; padding-bottom: 0.75rem; background: #fff; }

/* Deliverables + won't-do */
.ag-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: start; }
.ag-panel { background: #fff; border: 1px solid var(--ag-card-border); border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--ag-shadow); }
.ag-panel h2, .ag-panel .ag-panel-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--dark); margin-bottom: 1.25rem; }
.ag-checklist { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.5rem; }
.ag-checklist li { display: flex; gap: 0.6rem; font-size: 0.9rem; color: var(--dark); line-height: 1.5; }
.ag-checklist svg { color: #15803D; flex-shrink: 0; margin-top: 2px; }
.ag-wontdo { list-style: none; display: grid; gap: 0.9rem; }
.ag-wontdo li { display: flex; gap: 0.6rem; font-size: 0.9rem; line-height: 1.45; }
.ag-wontdo-x { width: 20px; height: 20px; border-radius: 50%; background: #fdecef; color: var(--danger); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; font-size: 0.75rem; margin-top: 1px; }
.ag-wontdo strong { display: block; color: var(--dark); font-weight: 600; }
.ag-wontdo span.ag-by { color: var(--grey-300); font-size: 0.82rem; }

/* Guardrails — dark band (the fleet's "asks before it acts" story) */
.ag-guardrails { background: linear-gradient(135deg, #1a1f35, #1e2a4a); color: #fff; padding: var(--section-gap) 0; position: relative; overflow: hidden; }
.ag-guardrails .ag-section-head h2 { color: #fff; }
.ag-guardrails .ag-section-head p { color: rgba(255, 255, 255, 0.8); }
.ag-guardrails .section-label { color: rgba(255, 255, 255, 0.75); }
.ag-guard-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; }
.ag-guard {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl); padding: 1.25rem 1.4rem;
  font-size: 0.92rem; line-height: 1.55; color: rgba(255, 255, 255, 0.9);
}
.ag-guard svg { color: #4ade80; flex-shrink: 0; }

/* Works with — mini agent cards */
.ag-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; list-style: none; }
.ag-mini {
  position: relative; display: flex; gap: 1rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--ag-card-border); border-radius: var(--radius-xl);
  padding: 1.25rem; box-shadow: var(--ag-shadow); transition: transform 0.2s, box-shadow 0.2s; height: 100%;
}
.ag-mini:hover { transform: translateY(-2px); box-shadow: var(--ag-shadow-hover); }
.ag-mini:focus-within { box-shadow: var(--ag-focus), var(--ag-shadow); }
.ag-mini .agent-art { width: 48px; height: 48px; }
.ag-mini h3 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--dark); }
.ag-mini h3 a::after { content: ''; position: absolute; inset: 0; }
.ag-mini h3 a:focus-visible { box-shadow: none; }
.ag-mini p { font-size: 0.85rem; color: var(--grey-300); line-height: 1.5; }

/* outline button on the dark cta-band */
.cta-band .ag-btn-on-dark { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cta-band .ag-btn-on-dark:hover { border-color: #fff; }

/* FAQ accordion */
.ag-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 0.75rem; }
.ag-faq details { background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius-lg); }
.ag-faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.25rem; position: relative;
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: var(--dark);
}
.ag-faq summary h3 { font: inherit; color: inherit; margin: 0; } /* FAQ questions are H3 (SEO-SPEC §3.1) */
.ag-faq summary::-webkit-details-marker { display: none; }
.ag-faq summary::after {
  content: '+'; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--primary);
}
.ag-faq details[open] summary::after { content: '\2212'; }
.ag-faq details[open] { border-color: rgba(51, 97, 255, 0.3); }
.ag-faq-a { padding: 0 1.25rem 1.2rem; color: var(--grey-300); font-size: 0.93rem; line-height: 1.65; }
.ag-faq-a p + p { margin-top: 0.75rem; } /* v5.76 F1: answers of two paragraphs */

/* ==========================================================================
   RESPONSIVE (site breakpoints: 1024 / 860 / 768 / 480)
   ========================================================================== */
@media (max-width: 1024px) {
  .ag-steps { grid-template-columns: repeat(3, 1fr); }
  .ag-outcomes-grid { grid-template-columns: repeat(2, 1fr); }
  .ag-outcome { border-left: 0; padding: 1.5rem 0; border-top: 1px solid var(--grey-200); }
  .ag-outcome:nth-child(-n+2) { border-top: 0; }
  .ag-outcome:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--grey-200); }
}
@media (max-width: 860px) {
  .ag-intro-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ag-hero-grid, .ag-split { grid-template-columns: 1fr; }
  .ag-hero-wall { display: none; }
  .ag-profile { max-width: 520px; }
  .ag-grid, .ag-features, .ag-mini-grid, .ag-faq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-guard-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --ag-filter-top: 72px; }
  .ag-hero { padding: 2rem 0 2.5rem; }
  .ag-hero h1 { font-size: 2rem; }
  .ag-steps { grid-template-columns: 1fr 1fr; }
  .ag-how { grid-template-columns: 1fr; gap: 1.5rem; }
  .ag-filterbar { padding: 0.75rem 0; position: relative; top: auto; } /* 3 rows is too tall to pin on a phone */
  .ag-search { flex-basis: 100%; max-width: none; }
  /* chips scroll sideways instead of wrapping into 4 rows */
  .ag-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .ag-chips::-webkit-scrollbar { display: none; }
  .ag-dd-panel { width: min(320px, calc(100vw - 2.5rem)); }
  .ag-usecase { grid-template-columns: 1fr; }
  .ag-usecase-head { display: none; }
  .ag-usecase-q { padding-bottom: 0.5rem !important; }
  .ag-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ag-grid, .ag-features, .ag-mini-grid, .ag-faq-tiles, .ag-steps, .ag-outcomes-grid { grid-template-columns: 1fr; }
  .ag-outcome, .ag-outcome:nth-child(even) { padding: 1.25rem 0; border-left: 0; border-top: 1px solid var(--grey-200); }
  .ag-outcome:first-child { border-top: 0; }
  .ag-outcome:nth-child(2) { border-top: 1px solid var(--grey-200); }
  /* icon-left card like the automations mobile tiles */
  .ag-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 1rem; align-content: start; padding: 1.25rem; }
  .ag-card-top { display: contents; }
  .ag-card-top .agent-art { grid-column: 1; grid-row: 1 / span 5; width: 48px; height: 48px; }
  .ag-card-top .ag-dept-pill { grid-column: 2; justify-self: start; margin-bottom: 0.45rem; }
  .ag-card > :not(.ag-card-top) { grid-column: 2; }
  .ag-card-tags, .ag-card-more { margin-top: 0.6rem; }
  .ag-dd, .ag-dd > summary { width: 100%; justify-content: space-between; }
  .ag-sort { width: 100%; }
  .ag-sort select { flex: 1; }
  .ag-profile-body { padding: 0 1.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-card, .ag-mini, .ag-chip, .ag-btn-ghost { transition: none; }
  .ag-card:hover, .ag-mini:hover { transform: none; }
}

/* Homepage "Meet the agents" block (CHG-0020 brief v3 section 3; rendered into index.html) */
.ag-home .ag-home-more { text-align: center; margin-top: 2rem; }

/* ==========================================================================
   Agents directory v1.1 visuals (CHG-0022). APPEND to css/agents.css (the
   same file, after the existing rules and before the @media blocks; a copy
   of the media rules goes into the matching existing @media blocks, or keep
   this block as-is at the end: the selectors are specific enough).
   Tokens only: --grey-*, --radius-*, --dark, --primary, --ag-shadow, --ag-card-border.
   Breakpoints: the directory's existing 1024 / 860 / 768 / 480.
   ========================================================================== */

/* ----- Shared figure primitive ----- */
.ag-fig { margin: 0; }
.ag-fig img { display: block; width: 100%; height: auto; }
.ag-fig figcaption { font-size: 0.82rem; line-height: 1.6; color: var(--grey-300); margin-top: 0.6rem; }
.ag-fig a { display: block; border-radius: inherit; }
.ag-fig a:focus-visible { outline: none; box-shadow: var(--ag-focus); }
.ag-fig a[data-lb] { cursor: zoom-in; }
.ag-talk a, .ag-inaction-illu a { border-radius: var(--radius-xl); } /* focus ring follows the rounded image */

/* ----- Slot 1: workflow diagram (How it works, above the step cards) ----- */
.ag-diagram {
  background: #fff; border: 1px solid var(--grey-200); border-radius: var(--radius-xl);
  box-shadow: var(--ag-shadow); padding: 0.75rem; margin-bottom: 2.25rem;
}
.ag-diagram img { border-radius: var(--radius-lg); aspect-ratio: 3 / 2; }
.ag-diagram .ag-fig-zoom { display: none; } /* "Tap to enlarge" hint, phones only */

/* ----- Slot 2: talk to it (Use cases, beside the table) ----- */
.ag-usecases-wrap { display: block; }
.ag-usecases-wrap.has-talk {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; align-items: center;
}
.ag-talk img { border-radius: var(--radius-xl); aspect-ratio: 1 / 1; object-fit: cover; background: #F6F8FF; }

/* ----- Slot 3: in action (What you get, above the panels) ----- */
.ag-inaction { margin-bottom: 2rem; padding-top: 0.75rem; } /* room for the phone badge that sits across the bezel top */

/* Mode "screens": 1 main browser frame + optional phone beside it, then up to 3 card frames.
   At 1440 the main shot (~872 px) and the phone (250 px) come out about the same height. */
.ag-screens { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "phone" "cards"; }
.ag-screens.has-main.has-phone { grid-template-columns: minmax(0, 1fr) 250px; grid-template-areas: "main phone" "cards cards"; align-items: start; }
.ag-shot-main { grid-area: main; }
.ag-shot-phone { grid-area: phone; }
.ag-shot-cards { grid-area: cards; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem;
  grid-template-columns: repeat(var(--ag-cards, 3), minmax(0, 1fr)); }
.ag-shot figcaption { padding: 0 0.25rem; }

/* Browser frame (main + cards). The "Demo data" badge sits in the frame bar, so it is never cropped. */
.ag-frame {
  position: relative; display: block; background: #F0F2F8; border: 1px solid var(--grey-200);
  border-radius: var(--radius-xl); box-shadow: var(--ag-shadow); overflow: hidden;
}
.ag-frame-bar { display: flex; gap: 6px; align-items: center; height: 30px; padding: 0 12px; background: var(--grey-100); border-bottom: 1px solid var(--grey-200); }
.ag-frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-200); }
.ag-shot-main .ag-frame img { aspect-ratio: auto; }                 /* main: whole screen, natural ratio */
.ag-shot-card .ag-frame img { aspect-ratio: 16 / 10; object-fit: contain; background: #F0F2F8; } /* cards: whole screen, app-grey letterbox */

/* Phone frame (mobile capture, already cropped to 9:19.5 by prep_screens.py) */
.ag-frame.is-phone { max-width: 250px; margin: 0 auto; border-radius: 32px; padding: 10px; background: var(--dark); border: 0; }
.ag-frame.is-phone img { aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top center; border-radius: 22px; }

/* "Demo data" badge: amber, on every screenshot, plus the one-line note under the set */
.ag-demo-badge {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1; padding: 0.3rem 0.6rem; border-radius: 999px;
  color: #92400E; background: #FEF3C7; border: 1px solid #F59E0B;
}
.ag-frame > .ag-demo-badge { position: absolute; top: 5px; right: 10px; z-index: 1; }
/* phone: the badge is pinned across the top edge of the bezel, clear of the tag burned into the screen */
.ag-frame.is-phone { overflow: visible; }
.ag-frame.is-phone > .ag-demo-badge { top: -10px; right: auto; left: 50%; transform: translateX(-50%); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.ag-demo-note { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 1.1rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--grey-300); }
.ag-demo-badge.is-inline { flex: none; }

/* Mode "illustration" (no public screenshots, the default for most agents): one centred image, no frame */
.ag-inaction-illu img { border-radius: var(--radius-xl); aspect-ratio: 3 / 2; object-fit: cover; background: #F6F8FF; }
.ag-inaction-illu { max-width: 880px; margin-inline: auto; }

@media (max-width: 1024px) {
  .ag-usecases-wrap.has-talk { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; }
  .ag-usecases-wrap.has-talk .ag-usecase { grid-template-columns: 1fr; }
  .ag-usecases-wrap.has-talk .ag-usecase-head { display: none; }
  .ag-usecases-wrap.has-talk .ag-usecase-q { padding-bottom: 0.5rem; }
  .ag-screens.has-main.has-phone { grid-template-columns: minmax(0, 1fr) 190px; }
}
@media (max-width: 768px) {
  .ag-diagram { padding: 0.4rem; margin-bottom: 1.75rem; }
  .ag-diagram .ag-fig-zoom { display: block; text-align: center; }
  .ag-usecases-wrap.has-talk { grid-template-columns: 1fr; }
  .ag-talk img { aspect-ratio: 4 / 3; object-position: 50% 20%; }
  .ag-screens.has-main.has-phone { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "phone" "cards"; }
  .ag-frame.is-phone { max-width: 220px; }
  /* cards become a swipeable strip (no JS) */
  .ag-shot-cards { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: thin; }
  .ag-shot-cards > li { flex: 0 0 80%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-shot-cards { scroll-behavior: auto; }
}

/* Image lightbox for agent-page visuals (CHG-0022 v1.1b; js/agents-lightbox.js). z-index above the event promo card (2147483000) and the chat launcher iframe (99999). */
html.ag-lb-open, html.ag-lb-open body { overflow: hidden; }
.ag-lb { position: fixed; inset: 0; z-index: 2147483600; display: flex; align-items: center; justify-content: center; background: rgba(10, 18, 40, 0.92); overscroll-behavior: contain; animation: ag-lb-in 0.15s ease-out; }
.ag-lb[hidden] { display: none; }
.ag-lb-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 4.25rem 4.5rem 2.5rem; box-sizing: border-box; }
.ag-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 92vw; }
.ag-lb-img { display: block; width: auto; height: auto; max-width: min(92vw, 100%); max-height: min(88vh, calc(100vh - 7rem)); object-fit: contain; border-radius: var(--radius-sm, 6px); background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.ag-lb.has-text .ag-lb-img { max-height: min(calc(88vh - 5.5rem), calc(100vh - 12.5rem)); }
.ag-lb-cap { margin: 0.8rem 0 0; max-width: 60rem; text-align: center; color: #fff; font-size: 0.95rem; line-height: 1.6; }
.ag-lb-note .ag-demo-note { justify-content: center; margin: 0.45rem 0 0; max-width: 60rem; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; }
.ag-lb-count { position: absolute; top: 1.1rem; left: 1.25rem; margin: 0; color: #fff; font-size: 0.9rem; font-weight: 600; line-height: 44px; }
.ag-lb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ag-lb-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--dark); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.ag-lb-btn[hidden] { display: none; }
.ag-lb-btn:hover { background: #fff; color: var(--primary); }
.ag-lb-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ag-lb-close { top: 0.9rem; right: 1rem; }
.ag-lb-prev, .ag-lb-next { top: 50%; transform: translateY(-50%); }
.ag-lb-prev { left: 1rem; }
.ag-lb-next { right: 1rem; }
@keyframes ag-lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 768px) {
  .ag-lb-stage { padding: 4.25rem 0.75rem 5.5rem; }
  .ag-lb-img { max-width: 100%; }
  .ag-lb.has-text .ag-lb-img { max-height: calc(100vh - 16rem); }
  .ag-lb-prev, .ag-lb-next { top: auto; bottom: 1rem; transform: none; }
  .ag-lb-prev { left: calc(50% - 60px); }
  .ag-lb-next { right: calc(50% - 60px); }
}
@media (prefers-reduced-motion: reduce) {
  .ag-lb { animation: none; }
}
/* v5.61 (CHG-0025 legal G2): the non-affiliation line on v1 agent pages that name third-party marks */
.ag-tm{margin:1.5rem 0 0;font-size:.8rem;line-height:1.6;color:var(--grey-300)}

/* v5.63.2 (CHG-0025 fix round, iPhone Safari paint): lighter to draw on phones. The lightbox has no backdrop blur
   (solid 92% dark, above); up to 480 px the image frames, diagram and cards get a small shadow instead of a 20-40 px
   blur, and image cards and the lightbox do not animate. Motion is also off for prefers-reduced-motion. */
@media (max-width: 480px) {
  :root { --ag-shadow: 0 1px 3px rgba(10, 20, 60, 0.08); --ag-shadow-hover: 0 1px 3px rgba(10, 20, 60, 0.08); }
  .ag-frame.is-phone > .ag-demo-badge { box-shadow: none; }
  .ag-lb { animation: none; }
  .ag-lb-img { box-shadow: none; }
  .ag-lb-btn { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
  .ag-card, .ag-mini, .ag-chip, .ag-btn-ghost { transition: none; }
  .ag-card:hover, .ag-mini:hover, .ag-btn-ghost:hover { transform: none; }
  .ag-shot-cards > li, .ag-outcome, .ag-usecase { will-change: auto; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-lb { animation: none; }
  .ag-btn-ghost:hover { transform: none; }
}
/* CHG-0030 v5.69 type floor (SPEC v14 2.4) on the directory + department pages: copy 16px, UI labels 12px.
   A floor only (raises sizes); !important because the CHG-0028 rules it sits on use media-query overrides. */
main .ah-count,main .ac-desc,main .ac-persona,main .ag-intro-grid>p,main .ag-section-head p,main .ag-faq-tile p,main .ag-how li>p{font-size:1rem!important}
main .ah-tab .c,main .ac-dept{font-size:.75rem!important}
