/*
 * "1 Agent inventory — You can't govern what you can't see" section (AI Agent Governance page),
 * plus the .dlh-aig-inv--baseline variant used by "2 Baseline metrics" and the .dlh-aig-inv--report variant
 * used by "3 Weekly executive report" and the .dlh-aig-inv--optimize variant used by "5 Optimize" (same numbered header, with tables and stat cards). Scoped under .dlh-aig-inv.
 */

.dlh-aig-inv {
  --dlh-aig-inv-ink: #1a1a1a;
  --dlh-aig-inv-grey: #f5f5f9;
  --dlh-aig-inv-blue: #e5e9fd;
  --dlh-aig-inv-line: #dbdbdb;

  font-family: "Inter", system-ui, sans-serif;
  isolation: isolate;   /* own stacking context: nothing inside can rise above the theme's sticky nav */
  color: #000;
  background: #fff;
  padding: 73.5px 16px 71.5px;
  overflow: hidden;
}

.dlh-aig-inv *,
.dlh-aig-inv *::before,
.dlh-aig-inv *::after { box-sizing: border-box; margin: 0; padding: 0; }
.dlh-aig-inv p,
.dlh-aig-inv h2,
.dlh-aig-inv h3,
.dlh-aig-inv li { font-family: inherit; color: inherit; text-transform: none; }
.dlh-aig-inv th,
.dlh-aig-inv td { font-family: inherit; color: inherit; text-transform: none; }
.dlh-aig-inv ol,
.dlh-aig-inv ul { list-style: none; }
.dlh-aig-inv img { display: block; max-width: none; border: 0; box-shadow: none; border-radius: 0; }

.dlh-aig-inv__inner {
  max-width: 992px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 21px;
  text-align: center;
}

/* Green numbered circle, shared by the eyebrow; the steps use the purple version */
.dlh-aig-inv-eyebrow__number,
.dlh-aig-inv-step__number {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #16a34a;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 16px; font-weight: 500; line-height: 1;
}
.dlh-aig-inv-step__number { background: #a855f7; }

.dlh-aig-inv-eyebrow { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dlh-aig-inv .dlh-aig-inv-eyebrow__label {
  font-size: 12px; font-weight: 600; line-height: 22px;
  letter-spacing: 4px; text-transform: uppercase;
}

.dlh-aig-inv .dlh-aig-inv__title {
  max-width: 662px;
  font-size: 56px; font-weight: 400; line-height: 62px; letter-spacing: -1.28px;
}
.dlh-aig-inv .dlh-aig-inv__sub {
  color: var(--dlh-aig-inv-ink);
  font-size: 24px; line-height: 29px; letter-spacing: -0.18px;
}

/* Two agent groups */
.dlh-aig-inv__groups {
  width: 100%; max-width: 854px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  text-align: left;
}
.dlh-aig-inv-group {
  min-height: 341px;
  padding: 32px;
  border-radius: 16px;
  background: var(--dlh-aig-inv-grey);
  display: flex; flex-direction: column; gap: 18px;
}
.dlh-aig-inv-group:nth-child(2) { background: var(--dlh-aig-inv-blue); }
.dlh-aig-inv .dlh-aig-inv-group__title {
  color: var(--dlh-aig-inv-ink);
  font-size: 24px; font-weight: 400; line-height: 29px; letter-spacing: -0.18px;
}
.dlh-aig-inv-group__points { display: flex; flex-direction: column; gap: 23px; }
.dlh-aig-inv .dlh-aig-inv-group__points li {
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--dlh-aig-inv-ink);
  font-size: 14px; line-height: 22px;
}
/* 4px top offset (Figma's wrapper padding) lines the 18px check up with the first line */
.dlh-aig-inv-group__points img { flex: none; width: 18px; height: 18px; margin-top: 4px; }

/* How we build it */
.dlh-aig-inv-steps {
  width: 100%; max-width: 854px;
  padding: 24px;
  border-radius: 24px;
  background: var(--dlh-aig-inv-grey);
  display: flex; flex-direction: column; gap: 16px;
  text-align: left;
}
.dlh-aig-inv .dlh-aig-inv-steps__title {
  color: var(--dlh-aig-inv-ink);
  font-size: 24px; font-weight: 400; line-height: 29px; letter-spacing: -0.18px;
}
.dlh-aig-inv-steps__list { display: grid; grid-template-columns: repeat(4, 1fr); padding: 10px; }
.dlh-aig-inv-step { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* Number + the rule running across the rest of the column (every step has one, as in Figma) */
.dlh-aig-inv-step__marker { display: flex; align-items: center; }
.dlh-aig-inv-step__marker::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--dlh-aig-inv-line);
}
.dlh-aig-inv-step__body { display: flex; flex-direction: column; gap: 12px; padding-right: 16px; color: var(--dlh-aig-inv-ink); }
.dlh-aig-inv .dlh-aig-inv-step__title { font-size: 16px; font-weight: 500; line-height: 22px; }
.dlh-aig-inv .dlh-aig-inv-step__text { font-size: 14px; line-height: 22px; }

/* ---------- 2 Baseline metrics variant ---------- */
.dlh-aig-inv.dlh-aig-inv--baseline { background: #f9fafa; padding: 76px 16px 74px; }

/* Metrics table: hairlines between cells, rounded outer corners (as the PE comparison tables) */
.dlh-aig-metrics { width: 100%; max-width: 854px; text-align: left; }
.dlh-aig-metrics table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate; border-spacing: 0;
  font-family: "Montserrat", sans-serif;
  color: #1d1f22;
}
.dlh-aig-metrics col:first-child { width: 26.1%; }   /* 223 / 854 */
.dlh-aig-metrics th,
.dlh-aig-metrics td {
  box-sizing: border-box;
  height: 54px;
  padding: 4px 16px;   /* so a two-line cell still fits Figma's 54px row */
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  background: #fff;
  vertical-align: middle;
  font-size: 14px; font-weight: 500; line-height: 22px; letter-spacing: 0.021px;
  text-align: left;
}
.dlh-aig-metrics tr > :last-child { border-right: 1px solid #e5e7eb; }
.dlh-aig-metrics tbody tr:last-child > * { border-bottom: 1px solid #e5e7eb; }
.dlh-aig-metrics thead th {
  height: 46px;
  padding: 11.5px 16px;
  background: #f9fafa;
  font-weight: 600; letter-spacing: 0.1px;
}
.dlh-aig-metrics thead th:first-child { border-top-left-radius: 16px; }
.dlh-aig-metrics thead th:last-child { border-top-right-radius: 16px; }
.dlh-aig-metrics tbody tr:last-child > :first-child { border-bottom-left-radius: 16px; }
.dlh-aig-metrics tbody tr:last-child > :last-child { border-bottom-right-radius: 16px; }

/* ---------- 5 Optimize variant: baseline-style table in an 855px column, plus a footnote ---------- */
.dlh-aig-inv.dlh-aig-inv--optimize { padding: 79.5px 16px 75.5px; }
.dlh-aig-inv--optimize .dlh-aig-inv__inner { max-width: 855px; }
.dlh-aig-inv .dlh-aig-inv__foot {
  width: 100%;
  color: var(--dlh-aig-inv-ink);
  font-size: 14px; line-height: 22px;
  text-align: left;
}

/* ---------- 3 Weekly executive report variant ---------- */
.dlh-aig-inv.dlh-aig-inv--report { padding: 80.5px 16px 79.5px; scroll-margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) {
  html:has(#weekly-executive-report) { scroll-behavior: smooth; }   /* "See a sample report" buttons jump here */
}
.dlh-aig-inv--report .dlh-aig-inv__inner { max-width: 1127px; }

/* Four stat cards, Figma widths 209.5 / 209.5 / 253 / 267 */
.dlh-aig-stats {
  width: 100%; max-width: 1002px;
  display: grid; grid-template-columns: 209.5fr 209.5fr 253fr 267fr; gap: 21px;
  text-align: left;
}
.dlh-aig-stat {
  padding: 32px;
  border-radius: 16px;
  background: #f1f1f1;
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}
.dlh-aig-inv .dlh-aig-stat__value {
  color: var(--dlh-aig-inv-ink);
  font-size: 40px; font-weight: 400; line-height: 48px; letter-spacing: -1.18px;
}
.dlh-aig-inv .dlh-aig-stat__label { font-size: 17px; line-height: 24px; letter-spacing: -0.18px; }

/* Agent table: 7 columns (223 / 135 / 135 / 128 / 128 / 139 / 239 of 1127); scrolls inside itself when narrow */
.dlh-aig-metrics--report { max-width: 1127px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dlh-aig-metrics--report col:nth-child(1) { width: 19.787%; }
.dlh-aig-metrics--report col:nth-child(2),
.dlh-aig-metrics--report col:nth-child(3) { width: 11.979%; }
.dlh-aig-metrics--report col:nth-child(4),
.dlh-aig-metrics--report col:nth-child(5) { width: 11.358%; }
.dlh-aig-metrics--report col:nth-child(6) { width: 12.334%; }
.dlh-aig-metrics--report col:nth-child(7) { width: 21.207%; }
.dlh-aig-metrics--report table { min-width: 1127px; }   /* Figma width: below it the table scrolls sideways in its own box, rows stay 54px */
.dlh-aig-metrics .is-num { text-align: right; }
.dlh-aig-metrics--report thead th { white-space: nowrap; }   /* Figma keeps every heading on one line */

.dlh-aig-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; letter-spacing: 1.5px;
  text-transform: uppercase; white-space: nowrap;
  vertical-align: middle;
}
.dlh-aig-status--on-track { background: #22c55e; }
.dlh-aig-status--watch { background: #fbbf24; }
.dlh-aig-status--at-risk { background: #ef4444; }


/* Tablet: steps go 2 × 2 */
@media (max-width: 900px) {
  .dlh-aig-inv,
  .dlh-aig-inv.dlh-aig-inv--baseline,
  .dlh-aig-inv.dlh-aig-inv--report,
  .dlh-aig-inv.dlh-aig-inv--optimize { padding: 72px 16px; }
  .dlh-aig-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .dlh-aig-inv .dlh-aig-inv__title {
    font-size: 44px; line-height: 50px; letter-spacing: -1px;
    text-wrap: balance;   /* no single word left on the last line ("see") */
  }
  .dlh-aig-inv-group { min-height: 0; }
  .dlh-aig-inv-steps__list { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
}

/* Phones: one column; steps run down the left with a vertical rule */
@media (max-width: 720px) {
  .dlh-aig-inv,
  .dlh-aig-inv.dlh-aig-inv--baseline,
  .dlh-aig-inv.dlh-aig-inv--report,
  .dlh-aig-inv.dlh-aig-inv--optimize { padding: 64px 16px; }
  .dlh-aig-metrics col:first-child { width: 38%; }
  .dlh-aig-metrics--report col:nth-child(1) { width: 19.787%; }
  .dlh-aig-stat { padding: 20px; gap: 8px; }
  .dlh-aig-inv .dlh-aig-stat__value { font-size: 32px; line-height: 39px; }
  .dlh-aig-inv .dlh-aig-stat__label { font-size: 15px; line-height: 21px; }
  .dlh-aig-metrics th,
  .dlh-aig-metrics td { height: auto; padding: 12px; font-size: 13px; line-height: 20px; }
  .dlh-aig-metrics thead th { height: auto; padding: 12px; }
  .dlh-aig-inv .dlh-aig-inv__title { font-size: 36px; line-height: 42px; letter-spacing: -0.8px; }
  .dlh-aig-inv .dlh-aig-inv__sub { font-size: 20px; line-height: 26px; }
  .dlh-aig-inv .dlh-aig-inv-eyebrow__label { letter-spacing: 2px; font-size: 11px; }
  .dlh-aig-inv__groups { grid-template-columns: 1fr; gap: 12px; }
  .dlh-aig-inv-group { padding: 24px; }
  .dlh-aig-inv-group__points { gap: 16px; }
  .dlh-aig-inv-steps { padding: 20px; }
  .dlh-aig-inv-steps__list { grid-template-columns: 1fr; row-gap: 0; padding: 0; }
  .dlh-aig-inv-step { flex-direction: row; gap: 16px; }
  .dlh-aig-inv-step__marker { flex-direction: column; align-items: center; }
  .dlh-aig-inv-step__marker::after { width: 1px; height: auto; }
  .dlh-aig-inv-step:last-child .dlh-aig-inv-step__marker::after { display: none; }
  .dlh-aig-inv-step__body { gap: 6px; padding: 0 0 20px; }
  .dlh-aig-inv-step:last-child .dlh-aig-inv-step__body { padding-bottom: 0; }
}
