/* sa-agents.css — components used only on /ai-agents (draft, Nov 2026).
   New class names (sa-ag-*) so the old sheets never touch them.
   Palette only, square corners, no strokes on cards, no letter-spacing. */

/* ---------- Hero: the agent log (the one memorable element) ---------- */
.sa-ag-log { text-align: left; margin: 0; padding: clamp(20px, 2.4vw, 32px); background: #101B37; color: #FFFFFF; min-width: 0; }
.sa-ag-log .sa-ag-log-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 18px; font-size: 13px; font-weight: 600; color: #CFD9EE; }
.sa-ag-log-h span:last-child { font-weight: 300; color: #6F8FC9; }
.sa-ag-log ol { margin: 0; padding: 0; list-style: none; }
.sa-ag-log li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; padding: 14px 0; box-shadow: inset 0 1px 0 rgba(207, 217, 238, .12); }
.sa-ag-log li:first-child { box-shadow: none; padding-top: 0; }
.sa-ag-log time { font-size: 14px; font-weight: 600; line-height: 1.5; color: #6F8FC9; font-variant-numeric: tabular-nums; }
.sa-ag-log p { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.5; color: #FFFFFF; }
.sa-ag-log .sa-ag-sys { display: inline-block; margin: 6px 6px 0 0; padding: 2px 8px; font-size: 12px; font-weight: 600; line-height: 1.6; background: #2F579A; color: #FFFFFF; }
.sa-ag-log li.is-human { margin-top: 6px; padding: 16px; background: #E6ECF7; box-shadow: none; }
.sa-ag-log li.is-human time { color: #2F579A; }
.sa-ag-log li.is-human p { color: #101B37; font-weight: 600; }
.sa-ag-log li.is-human .sa-ag-sys { background: #101B37; }
.sa-ag-log figcaption { text-align: left; margin-top: 16px; font-size: 13px; font-weight: 300; line-height: 1.5; color: #CFD9EE; }
/* one orchestrated reveal on load. The hidden start lives only inside the keyframes,
   so where animations are switched off (reduced motion, html.sa-lite) every line is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  .sa-ag-log.is-play li { animation: sa-ag-in .5s ease both; }
  .sa-ag-log.is-play li:nth-child(1) { animation-delay: .3s; }
  .sa-ag-log.is-play li:nth-child(2) { animation-delay: 1.1s; }
  .sa-ag-log.is-play li:nth-child(3) { animation-delay: 1.9s; }
  .sa-ag-log.is-play li:nth-child(4) { animation-delay: 2.7s; }
  .sa-ag-log.is-play li:nth-child(5) { animation-delay: 3.7s; }
}
@keyframes sa-ag-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Three areas ---------- */
.sa-ag-areas { margin-top: clamp(40px, 6vh, 64px); display: grid; gap: 16px; }
.sa-ag-area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 3.2vw, 48px); background: #E6ECF7; }
.sa-ag-area h3 { margin: 0; font-size: clamp(22px, 1vw + 14px, 28px); font-weight: 800; line-height: 1.2; color: #101B37; }
.sa-ag-area-pain { margin: 12px 0 0; max-width: 32ch; font-size: 17px; font-weight: 300; line-height: 1.5; color: #101B37; }
.sa-ag-area-proof { margin: 24px 0 0; padding: 16px 18px; max-width: 40ch; background: #FFFFFF; font-size: 14px; font-weight: 300; line-height: 1.55; color: #101B37; }
.sa-ag-area-proof b { display: block; margin-bottom: 4px; font-weight: 600; color: #2F579A; }
.sa-ag-area-k { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #2F579A; }
.sa-ag-area ul { margin: 0; padding: 0; list-style: none; }
.sa-ag-area li { position: relative; padding: 9px 0 9px 26px; font-size: 16px; font-weight: 300; line-height: 1.5; color: #101B37; box-shadow: inset 0 -1px 0 #CFD9EE; }
.sa-ag-area li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 10px; height: 6px; border-left: 2px solid #4E72B7; border-bottom: 2px solid #4E72B7; transform: rotate(-45deg); }
.sa-ag-area-sys { margin: 20px 0 0; font-size: 14px; font-weight: 300; line-height: 1.55; color: #101B37; }
.sa-ag-area-sys b { font-weight: 600; color: #2F579A; }

/* ---------- Comparison ---------- */
.sa-ag-cmp { width: 100%; margin-top: clamp(36px, 5vh, 56px); border-collapse: collapse; table-layout: fixed; }
.sa-ag-cmp caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sa-ag-cmp th, .sa-ag-cmp td { padding: 16px clamp(12px, 2vw, 24px); text-align: left; vertical-align: top; font-size: 16px; line-height: 1.5; }
.sa-ag-cmp thead th { font-size: 14px; font-weight: 600; color: #2F579A; padding-bottom: 12px; }
.sa-ag-cmp thead th.is-us { background: #101B37; color: #FFFFFF; padding-top: 16px; }
.sa-ag-cmp tbody th { width: 24%; font-weight: 600; color: #101B37; }
.sa-ag-cmp tbody td { font-weight: 300; color: #101B37; }
.sa-ag-cmp tbody tr { box-shadow: inset 0 -1px 0 #CFD9EE; }
.sa-ag-cmp tbody td.is-us { background: #101B37; color: #FFFFFF; box-shadow: inset 0 -1px 0 rgba(207, 217, 238, .14); }
.sa-ag-cmp col.c1 { width: 24%; }

/* ---------- Start steps: two columns of the shared step list ---------- */
.sa-ag-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 80px); margin-top: clamp(36px, 5vh, 56px); }
.sa-ag-start .sa-c-step:first-child { padding-top: 18px; }
.sa-ag-start-note { margin: clamp(28px, 4vh, 40px) 0 0; max-width: 60ch; font-size: 15px; font-weight: 300; line-height: 1.6; color: #101B37; }

/* ---------- FAQ ---------- */
.sa-ag-faq { margin-top: clamp(32px, 5vh, 48px); max-width: 860px; }
.sa-ag-faq details { box-shadow: inset 0 -1px 0 #CFD9EE; }
.sa-ag-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 56px; padding: 16px 0; font-size: 18px; font-weight: 600; line-height: 1.4; color: #101B37; }
.sa-ag-faq summary::-webkit-details-marker { display: none; }
.sa-ag-faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid #4E72B7; border-bottom: 2px solid #4E72B7; transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s ease; }
.sa-ag-faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.sa-ag-faq summary:focus-visible { outline: 2px solid #4E72B7; outline-offset: 4px; }
.sa-ag-faq details p { margin: 0 0 20px; max-width: 65ch; font-size: 16px; font-weight: 300; line-height: 1.6; color: #101B37; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sa-ag-area { grid-template-columns: minmax(0, 1fr); }
  .sa-ag-start { grid-template-columns: minmax(0, 1fr); }
  .sa-ag-start .sa-c-step:first-child { padding-top: 18px; }
}
@media (max-width: 640px) {
  .sa-ag-cmp, .sa-ag-cmp tbody, .sa-ag-cmp tr, .sa-ag-cmp th, .sa-ag-cmp td { display: block; width: auto; }
  .sa-ag-cmp thead { display: none; }
  .sa-ag-cmp tbody tr { padding: 16px 0; }
  .sa-ag-cmp tbody th { width: auto; padding: 0 0 8px; }
  .sa-ag-cmp tbody td { padding: 10px 14px; }
  .sa-ag-cmp tbody td::before { content: attr(data-k); display: block; font-size: 12px; font-weight: 600; color: #2F579A; margin-bottom: 2px; }
  .sa-ag-cmp tbody td.is-us::before { color: #CFD9EE; }
  .sa-ag-log li { grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; }
}

/* ---------- Sourced figure under each area's problem ---------- */
.sa-ag-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 16px; margin: 24px 0 0; max-width: 40ch; }
.sa-ag-stat b { font-size: clamp(36px, 2vw + 20px, 52px); font-weight: 800; line-height: 1; color: #2F579A; font-variant-numeric: tabular-nums; }
.sa-ag-stat span { padding-top: 2px; font-size: 14px; font-weight: 300; line-height: 1.5; color: #101B37; }
.sa-ag-stat a { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: #2F579A; text-decoration: none; }
.sa-ag-stat a:hover { text-decoration: underline; }
.sa-ag-stat a:focus-visible { outline: 2px solid #4E72B7; outline-offset: 2px; }

.sa-ag-cmp .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* headings on this page break into balanced lines, no single-word last line */
.sa-c-h2, .sa-cta-h2, .sa-c-h1 { text-wrap: balance; }

/* hero title on this page: smaller so it sits on fewer lines */
.sa-c-hero .sa-c-h1 { max-width: 20ch; font-size: min(clamp(32px, 1.4vw + 18px, 48px), 6vh); line-height: 1.08; }

/* ---------- Icons (Hugeicons free, stroke rounded, MIT; assets/icons/hugeicons) ----------
   Drawn with a mask so they take the text colour of their place; square tiles, palette only. */
.sa-ag-ic, .sa-ag-hic { display: block; flex: none; background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
/* three areas: a dark square tile with the icon in white above the heading */
.sa-ag-area .sa-ag-ic { position: relative; width: 48px; height: 48px; margin: 0 0 20px; background-color: #101B37; -webkit-mask: none; mask: none; }
.sa-ag-area .sa-ag-ic::before { content: ""; position: absolute; inset: 12px; background-color: #FFFFFF;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
/* connection diagram: a small icon above each system name, a larger one in the centre */
.sa-hub .sa-ag-hic { width: 20px; height: 20px; margin: 0 auto 6px; background-color: #CFD9EE; }
.sa-hub .sa-ag-hic.is-core { width: 24px; height: 24px; margin-bottom: 4px; background-color: #FFFFFF; }
/* In short: the same icons as the project pages (people, warning, idea, badge) */
.sa-c-tldr-l > div > dt { display: flex; align-items: center; gap: 8px; }
.sa-c-tldr-l > div > dt::before { content: ""; flex: none; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: var(--sa-ic) center / contain no-repeat; mask: var(--sa-ic) center / contain no-repeat; }
.sa-c-tldr-l > div:nth-child(1) > dt { --sa-ic: url("../icons/hugeicons/user-group.svg?v=2"); }
.sa-c-tldr-l > div:nth-child(2) > dt { --sa-ic: url("../icons/hugeicons/alert-02.svg?v=2"); }
.sa-c-tldr-l > div:nth-child(3) > dt { --sa-ic: url("../icons/hugeicons/idea-01.svg?v=2"); }
.sa-c-tldr-l > div:nth-child(4) > dt { --sa-ic: url("../icons/hugeicons/checkmark-badge-01.svg?v=2"); }
/* the label column makes room for the icon, as on the project pages */
@media (min-width: 761px) { .sa-c-tldr-l > div { grid-template-columns: 148px minmax(0, 1fr); } }
@media (min-width: 601px) and (max-width: 760px) { .sa-c-tldr-l > div { grid-template-columns: 132px minmax(0, 1fr); } }
@media (max-width: 600px) { .sa-c-tldr-l > div > dt { gap: 6px; } .sa-c-tldr-l > div > dt::before { width: 18px; height: 18px; } }
/* diagram as a list (phones): the icon sits at the left of the name, not centred above it;
   the circle in the middle keeps only its words */
.sa-hub.is-net.is-list .sa-hub-node { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.sa-hub.is-net.is-list .sa-hub-node .sa-ag-hic { grid-column: 1; grid-row: 1 / span 2; margin: 1px 0 0; }
.sa-hub.is-net.is-list .sa-hub-node b, .sa-hub.is-net.is-list .sa-hub-node span { grid-column: 2; }
.sa-hub.is-net.is-list .sa-ag-hic.is-core { display: none; }
/* shorter screens beside the text (laptops, tablets on their side): a tighter log, so the whole
   example stays on the first screen next to the heading */
@media (min-width: 901px) and (max-height: 860px) {
  .sa-ag-log { padding: 18px 22px; }
  .sa-ag-log .sa-ag-log-h { margin-bottom: 10px; }
  .sa-ag-log li { padding: 9px 0; }
  .sa-ag-log p { font-size: 14px; line-height: 1.45; }
  .sa-ag-log .sa-ag-sys { margin-top: 4px; padding: 1px 7px; font-size: 11.5px; }
  .sa-ag-log li.is-human { margin-top: 4px; padding: 12px 14px; }
  .sa-ag-log figcaption { margin-top: 10px; font-size: 12.5px; }
}

/* ---------- MCP servers: the same card as the three areas, then the four build steps ---------- */
.sa-ag-mcp .sa-ag-area-proof { margin-top: 0; }
.sa-ag-mcp-k { margin: clamp(40px, 6vh, 64px) 0 0; }
.sa-ag-start.sa-ag-mcp-steps { margin-top: 8px; }
