/* Homepage: "Your AI army", a D3 network of the 100 Autowhat agents and the systems they work in
   (built by scripts/build_agents100.py, drawn by js/army-home.js) */
.ar-field { position: relative; margin-top: clamp(18px, 2.4vw, 30px); padding: clamp(14px, 2.2vw, 28px); border-radius: 26px; overflow: hidden;
  background: radial-gradient(70% 70% at 38% 50%, #0f5866 0%, #0a2a31 55%, #061519 100%); box-shadow: 0 30px 60px -40px rgba(4, 40, 48, .7); color: #e3f6fa; }
.ar-field::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image: linear-gradient(rgba(92, 200, 214, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 200, 214, .07) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 70% at 38% 50%, #000 20%, transparent 100%); mask-image: radial-gradient(70% 70% at 38% 50%, #000 20%, transparent 100%); }
.ar-net__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(12px, 2vw, 28px); align-items: center; }

/* the network */
.ar-svg { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto; overflow: visible; font-family: "Source Sans 3", system-ui, sans-serif; }
.ar-ring { fill: none; stroke: rgba(92, 200, 214, .1); stroke-dasharray: 2 5; }
.ar-fam path { opacity: .9; transition: opacity .2s; }
.ar-fam__l { font-size: 22px; font-weight: 700; text-anchor: middle; dominant-baseline: central; cursor: default; }
.ar-fam { cursor: pointer; }
.ar-links path { fill: none; stroke-width: 1.05; stroke-opacity: .28; mix-blend-mode: screen; transition: stroke-opacity .25s, stroke-width .25s; }
.ar-handoffs path { fill: none; stroke: #ffd166; stroke-width: 1.6; stroke-dasharray: 4 4; stroke-opacity: .75; animation: arDash 1.2s linear infinite; }
@keyframes arDash { to { stroke-dashoffset: -16; } }
.ar-core__n { fill: #fff; font-size: 40px; font-weight: 700; text-anchor: middle; }
.ar-core__t { fill: #5cc8d6; font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .18em; text-anchor: middle; }
.ar-core__s { fill: rgba(227, 246, 250, .7); font-size: 11px; text-anchor: middle; }
.ar-h { cursor: pointer; outline: none; }
.ar-h__dot { fill: #0d3a43; stroke: #5cc8d6; stroke-width: 1.6; transition: fill .2s, stroke .2s; }
.ar-h__ping { fill: none; stroke: #5cc8d6; stroke-width: 2; opacity: 0; }
.ar-h__n { fill: #fff; font-size: 12px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.ar-h__l { fill: rgba(227, 246, 250, .86); font-size: 11.5px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: #0a2a31; stroke-width: 3px; }
.ar-h:hover .ar-h__dot, .ar-h:focus-visible .ar-h__dot, .ar-h.on .ar-h__dot { fill: #0b8fa8; stroke: #fff; }
.ar-n { cursor: pointer; outline: none; }
.ar-n__halo { opacity: 0; transition: opacity .2s; }
.ar-n__dot { stroke: rgba(6, 21, 25, .9); stroke-width: 1.2; transition: r .2s; }
.ar-n__l { fill: rgba(227, 246, 250, .74); font-size: 10.5px; transition: fill .2s, opacity .2s; }
.ar-n:hover .ar-n__l, .ar-n:focus-visible .ar-n__l, .ar-n.on .ar-n__l { fill: #fff; font-weight: 700; }
.ar-n:hover .ar-n__halo, .ar-n:focus-visible .ar-n__halo, .ar-n.on .ar-n__halo { opacity: .35; }
.ar-n.is-duty .ar-n__halo { opacity: .55; animation: arHalo 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes arHalo { 50% { transform: scale(1.6); opacity: .15; } }
/* focus: one agent, system or family lit, the rest dimmed */
.ar-svg.is-focus .ar-links path { stroke-opacity: .05; }
.ar-svg.is-focus .ar-links path.on { stroke-opacity: .95; stroke-width: 2; }
.ar-svg.is-focus .ar-n:not(.on) { opacity: .28; }
.ar-svg.is-focus .ar-h:not(.on) { opacity: .35; }
.ar-svg.is-focus .ar-handoffs path:not(.on) { stroke-opacity: .15; }
.ar-svg.is-focus .ar-fam:not(.on) path { opacity: .35; }

/* the card beside the network */
.ar-card { --c: #0b8fa8; align-self: center; padding: 18px 18px 16px; border-radius: 18px; background: rgba(6, 21, 25, .55); border: 1px solid rgba(255, 255, 255, .1); border-top: 3px solid var(--c); backdrop-filter: blur(6px); min-height: 230px; }
.ar-card h3 { margin: 6px 0 8px; font-size: 21px; line-height: 1.2; color: #fff; }
.ar-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; color: rgba(227, 246, 250, .82); }
.ar-card__k { display: flex; align-items: center; gap: 8px; margin: 0 !important; font: 600 11px/1 "IBM Plex Mono", monospace !important; letter-spacing: .12em; text-transform: uppercase; color: #5cc8d6 !important; }
.ar-card__k span { padding: 4px 6px; border-radius: 6px; background: var(--c); color: #fff; letter-spacing: .04em; }
.ar-card__m { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 16px; font-size: 13px; color: rgba(227, 246, 250, .7); }
.ar-card__m b { display: block; font-size: 22px; line-height: 1.1; color: #fff; }
.ar-card__w { font-size: 13.5px !important; }
.ar-card__w b { color: #fff; }
.ar-card__sys { display: flex; flex-wrap: wrap; gap: 5px; }
.ar-card__sys span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(92, 200, 214, .14); color: #bfeef5; }
.ar-card__bars { display: flex; gap: 2px; height: 26px; border-radius: 8px; overflow: hidden; }
.ar-card__bars i { display: grid; place-items: center; min-width: 14px; font: 700 11px/1 "Source Sans 3", system-ui, sans-serif; font-style: normal; color: #fff; }
.ar-card__go { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 700; color: #5cc8d6; text-decoration: none; }
.ar-card__go:hover { text-decoration: underline; }

/* system chips */
.ar-hubs { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ar-hub { appearance: none; border: 1px solid rgba(92, 200, 214, .3); background: rgba(255, 255, 255, .04); color: #d6f2f7; border-radius: 999px; padding: 7px 12px; font: 600 13px/1 "Source Sans 3", system-ui, sans-serif; cursor: pointer; transition: background .2s, border-color .2s; }
.ar-hub:hover { border-color: #5cc8d6; }
.ar-hub[aria-pressed="true"] { background: #0b8fa8; border-color: #0b8fa8; color: #fff; }

/* on-duty ticker */
.ar-duty { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); min-height: 52px; }
.ar-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2fd3a0; box-shadow: 0 0 0 0 rgba(47, 211, 160, .6); animation: arPulse 1.8s infinite; }
@keyframes arPulse { 70% { box-shadow: 0 0 0 10px rgba(47, 211, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 160, 0); } }
.ar-duty__l { flex: none; font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: #5cc8d6; }
.ar-duty__t { min-width: 0; font-size: 15px; line-height: 1.4; }
.ar-duty__t b { color: #fff; }
.ar-duty__t em { font-style: normal; margin-left: 8px; font: 600 10.5px/1 "IBM Plex Mono", monospace; padding: 4px 7px; border-radius: 6px; background: rgba(47, 211, 160, .16); color: #7de8c4; white-space: nowrap; }
.ar-duty__t em.ok { background: rgba(232, 163, 23, .18); color: #ffd27a; }
.ar-net:not(.is-drawn):not(.is-failed) .ar-svg { min-height: 360px; }
.ar-net.is-failed .ar-net__stage, .ar-net.is-failed .ar-hubs { display: none; }

/* roster: all 100 as links (also the fallback when D3 cannot load) */
.ar-roster { margin-top: 14px; }
.ar-roster > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font: 700 13px/1 "Source Sans 3", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #0a6f83; padding: 10px 0; }
.ar-roster > summary::-webkit-details-marker { display: none; }
.ar-roster > summary::after { content: "+"; font-size: 18px; line-height: 1; }
.ar-roster[open] > summary::after { content: "–"; }
.ar-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-top: 8px; padding: 14px; border-radius: 20px; background: #0a2a31; }
.ar-reg { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ar-reg:last-child { --c: #4a8fa3 !important; } /* J's ink colour vanishes on the dark field */
.ar-flag { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; margin-bottom: 3px; border-radius: 12px; background: var(--c); color: #fff; min-height: 58px; }
.ar-flag b { font: 700 18px/1 "Source Sans 3", system-ui, sans-serif; }
.ar-flag span { font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.ar-u { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 6px 9px; border-radius: 9px; text-decoration: none; min-width: 0; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07); box-shadow: inset 3px 0 0 var(--c); transition: background .2s; }
.ar-u:hover, .ar-u:focus-visible { background: color-mix(in srgb, var(--c) 32%, transparent); border-color: var(--c); }
.ar-u b { font: 700 10.5px/1 "IBM Plex Mono", monospace; color: color-mix(in srgb, var(--c) 55%, #fff); }
.ar-u span { font-size: 12px; line-height: 1.2; color: rgba(227, 246, 250, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* footer */
.ar-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 16px; }
.ar-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 30px; }
.ar-stats li { display: flex; flex-direction: column; }
.ar-stats b { font-size: clamp(24px, 2.2vw, 32px); line-height: 1; font-weight: 600; color: #0a6f83; letter-spacing: -.02em; }
.ar-stats span { font-size: 12.5px; color: #6a7779; margin-top: 4px; }
.ar-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.ar-cta .s-cta { margin: 0; }
.ar-cta .scm-link { font: 700 13px/1 "Source Sans 3", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #0a6f83; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 4px; }

@media (max-width: 1100px) {
  .ar-net__stage { grid-template-columns: 1fr; }
  .ar-card { min-height: 0; }
  .ar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 14px; }
}
@media (max-width: 700px) {
  .ar-n__l, .ar-h__l { display: none; }
  .ar-fam__l { font-size: 28px; }
  .ar-h__n { font-size: 15px; }
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .ar-flag { min-height: 0; }
  .ar-duty { align-items: flex-start; flex-wrap: wrap; }
  .ar-duty__t { flex-basis: 100%; font-size: 14px; }
  .ar-duty__t em { display: inline-block; margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .ar-handoffs path, .ar-pulse, .ar-n.is-duty .ar-n__halo { animation: none; } }
