/* /ai-agents/ page styles. Shared tokens and the dp-* kit live in styles.css.
   Motion rule for this page: only things that show the product move (a message arriving,
   a call note landing, a booking landing, a quote filling in). Each plays once when it
   comes into view, via .play from js/agent.js. Hidden start states live behind .js;
   reduced motion shows final states. */

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ag-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* small shared pieces */
.ag-tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ag-av {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: #fff; font: 700 0.92rem/1 var(--font-head);
}
.ag-ico {
  width: 44px; height: 44px; flex: none; padding: 10px; border-radius: 12px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.ag-b { font-size: 0.9rem; line-height: 1.5; padding: 9px 12px; border-radius: 14px; max-width: 86%; }
.ag-b small { display: block; margin-top: 3px; font-size: 0.7rem; color: var(--ink-2); text-align: right; }
.ag-b-in { justify-self: start; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ag-b-out { justify-self: end; align-self: flex-end; background: #DCF8C6; color: #12351C; border-bottom-right-radius: 4px; }
.ag-b-out small { color: #4B7458; }
.ag-slot { position: relative; display: flex; flex-direction: column; }
.ag-typing { display: none; }
.js .ag-typing {
  position: absolute; right: 0; top: 0; display: inline-flex; gap: 4px; opacity: 0;
  padding: 12px 14px; background: #DCF8C6; border-radius: 14px 14px 4px 14px;
}
.ag-typing i, .agd-typing i { width: 6px; height: 6px; border-radius: 50%; background: #3F8F55; }

/* play-once sequences: .pi items rise in, .pt typing dots show then hide, .pl lands */
.js [data-play] .pi { opacity: 0; transform: translateY(8px); }
.js [data-play] .pl { opacity: 0; transform: translateY(-10px) scale(0.96); }
.js [data-play].play .pi, .js [data-play].play .pl { animation: agIn 420ms var(--ease-sig) var(--d, 0ms) forwards; }
.js [data-play].play .pt { animation: agType 1150ms ease var(--d, 0ms) forwards; }
.js [data-play].play .pt i { animation: agDot 560ms ease-in-out var(--d, 0ms) 2; }
.js [data-play].play .pt i:nth-child(2) { animation-delay: calc(var(--d, 0ms) + 140ms); }
.js [data-play].play .pt i:nth-child(3) { animation-delay: calc(var(--d, 0ms) + 280ms); }
@keyframes agIn { to { opacity: 1; transform: none; } }
@keyframes agOut { to { opacity: 0; } }
@keyframes agType { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes agDot { 50% { transform: translateY(-3px); } }
@keyframes agFlash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* 1. Hero: a day across several agents */
.ag-hero { padding-block: 88px 96px; text-align: left; overflow: hidden; }
/* the kit centres hero paragraphs (.dp-hero p); this hero is left-aligned */
.dp-hero.ag-hero p { margin-inline: 0; }
.ag-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.ag-hero .dp-h1 { margin: 14px 0 0; max-width: 11ch; font-size: clamp(2.7rem, 1.2rem + 4.4vw, 4.9rem); }
.ag-hero .dp-lede { margin: 24px 0 0; max-width: 40ch; text-wrap: pretty; }
.ag-hero-link { margin-top: 22px; }

.ag-stack {
  margin: 0; padding: 8px 10px 10px; border-radius: 28px; background: #111214; border: 1px solid #26272C;
  box-shadow: 0 -20px 80px -30px rgba(110, 162, 255, 0.25);
}
.ag-stack-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 14px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dark-ink-2); }
.ag-stack .ag-tag { color: var(--dark-ink-2); }
.ag-stack ol { list-style: none; display: grid; gap: 8px; }
.ag-stack li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; padding: 13px 16px 13px 13px; border-radius: 18px; background: #1B1C20; border: 1px solid #2A2B31; }
.ag-stack .ag-ico { background: rgba(110, 162, 255, 0.14); color: var(--accent-on-dark); }
.ag-stack li p { font-size: 0.95rem; line-height: 1.4; color: #fff; }
.ag-stack-who { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 2px; font-size: 0.76rem; font-weight: 600; color: var(--dark-ink-2); }
.ag-stack-who time { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 2. Explore the agents: a lineup of cards (tabs) over one detail panel */
.agx { margin-top: 48px; }
.agx-cards { display: none; }
.js .agx-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.agx-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; min-height: 44px;
  padding: 18px 16px 20px; border: 1px solid transparent; border-radius: 18px; cursor: pointer; text-align: left;
  background: var(--panel); color: var(--ink); font: inherit;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.agx-card .ag-ico { background: #fff; color: var(--ink); margin-bottom: 14px; }
.agx-card strong { font: 700 1.02rem/1.2 var(--font-head); letter-spacing: -0.01em; }
.agx-card span { font-size: 0.84rem; line-height: 1.35; color: var(--ink-2); }
.agx-card:hover { border-color: #C9CACF; }
.agx-card[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.agx-card[aria-selected="true"] span { color: var(--dark-ink-2); }
.agx-card[aria-selected="true"] .ag-ico { background: rgba(110, 162, 255, 0.16); color: var(--accent-on-dark); }
.agx-card--own .ag-ico { background: transparent; border: 1.5px dashed #A9ABB1; }

.agx-panel {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 12px;
  margin-top: 16px; padding: 12px; border-radius: 28px; background: var(--panel);
}
.agx-panel[hidden] { display: none; }
html:not(.js) .agx-panel + .agx-panel { margin-top: 20px; }
.js .agx-panel.is-in { animation: agxIn 380ms var(--ease-sig) both; }
@keyframes agxIn { from { opacity: 0; transform: translateY(10px); } }
.agx-txt { display: flex; flex-direction: column; padding: 36px 24px 36px 36px; }
.agx-name { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.agx-txt h3 { margin-top: 12px; font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.4rem); line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.agx-txt > p:not([class]) { margin-top: 14px; font-size: 1.02rem; color: var(--ink-2); }
.agx-rep { margin-top: 22px; padding: 13px 16px; border-radius: var(--radius); background: #fff; font-weight: 600; }
.agx-rep span, .agx-set-h { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6E7076; margin-bottom: 2px; }
.agx-set-h { margin: 24px 0 0; }
.agx-set { list-style: none; margin-top: 10px; display: grid; gap: 8px; }
.agx-set li { position: relative; padding-left: 24px; font-size: 0.97rem; }
.agx-set li::before { content: ''; position: absolute; left: 0; top: 0.8em; width: 12px; height: 2px; background: var(--accent); }
.agx-go { margin-top: 18px; }

.agx-stage { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 540px; padding: 32px; border-radius: 20px; background: #fff; overflow: hidden; }
.agx-stage > * { width: 100%; max-width: 420px; }

/* enquiry agent: the phone, cropped by the bottom edge of the stage */
.agx-stage--phone { align-items: flex-end; padding-bottom: 0; }
.ag-phone {
  width: 330px; margin: 0; padding: 12px 12px 0; border-radius: 50px 50px 0 0;
  background: #1B1C20; border: 1px solid #2C2D33; border-bottom: 0;
}
.ag-phone-screen { background: #EFEFF1; color: var(--ink); border-radius: 39px 39px 0 0; overflow: hidden; min-height: 410px; }
.ag-phone-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px 6px; font: 600 0.8rem/1 var(--font-body); background: #fff; }
.ag-phone-status i { width: 22px; height: 10px; border: 1.5px solid var(--ink); border-radius: 3px; position: relative; }
.ag-phone-status i::after { content: ''; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: var(--ink); border-radius: 1px; }
.ag-phone-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.ag-phone-who { display: flex; flex-direction: column; line-height: 1.25; font-size: 0.92rem; }
.ag-phone-who small { font-size: 0.74rem; color: var(--ink-2); }
.ag-phone-head .ag-tag { margin-left: auto; }
.ag-phone-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 24px; }
.ag-meta { align-self: flex-end; font-size: 0.72rem; color: var(--ink-2); margin-top: -4px; }

/* voice concierge: a call with its notes */
.agx-call-h, .agx-recs-h, .ag-cal-h, .ag-quote-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.agx-call-h { padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.agx-live { display: inline-flex; align-items: center; gap: 8px; }
.agx-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.agx-line { max-width: 88%; margin-top: 8px; padding: 9px 13px; border-radius: 14px; background: var(--panel); font-size: 0.9rem; line-height: 1.45; }
.agx-line b { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; color: #6E7076; }
.agx-line--ai { margin-left: auto; background: #EEF4FF; }
.agx-taken { margin-top: 14px; padding: 12px 16px 6px; border: 1px solid #BFD3F9; border-radius: var(--radius); background: #F3F7FF; }
.agx-taken-h { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.agx-taken-h span + span { text-transform: none; letter-spacing: 0; color: var(--ink-2); font-size: 0.8rem; }
.agx-taken dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid #DCE6FB; font-size: 0.9rem; }
.agx-taken dt { color: var(--ink-2); }
.agx-taken dd { font-weight: 600; }

/* appointment setter: a chat, then the slot lands in the calendar */
.agx-booking { display: flex; flex-direction: column; gap: 10px; }
.agx-booking .ag-b-in { background: var(--panel); border-color: transparent; }
.ag-cal { margin-top: 10px; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ag-cal-h { margin-bottom: 12px; }
.ag-cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ag-cal-d { font-size: 0.74rem; font-weight: 600; color: var(--ink-2); }
.ag-cal-grid i { position: relative; height: 58px; border-radius: var(--radius-sm); border: 1px dashed var(--line); }
.ag-cal-grid i.busy { border: 0; background: repeating-linear-gradient(135deg, var(--panel) 0 6px, #EDEDEF 6px 12px); }
.ag-cal-free { border-color: #BFD3F9 !important; }
.ag-cal-free b {
  position: absolute; inset: -1px; z-index: 1; border-radius: var(--radius-sm); background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 600; font-style: normal; line-height: 1.3; padding: 7px 8px; overflow: hidden;
  box-shadow: 0 10px 20px -10px rgba(14, 99, 244, 0.6);
}

/* quote agent: a draft quote, lines only, no amounts shown */
.ag-quote { padding: 20px 22px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 30px 60px -36px rgba(10, 10, 11, 0.35); }
.ag-quote-sub { margin-top: 4px; font-size: 0.84rem; color: var(--ink-2); }
.ag-quote ul { list-style: none; margin: 14px 0 4px; }
.ag-quote li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.ag-quote li i { flex: none; width: 56px; height: 10px; border-radius: 5px; background: #E9E9EC; }
.ag-quote-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 0.8rem; color: var(--ink-2); }
.ag-quote-foot span { padding: 4px 10px; border-radius: 999px; background: #EEF4FF; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* records agent: one record updating, the rest already filed */
.agx-recs { padding: 4px 18px 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.agx-recs-h { padding: 12px 0; border-bottom: 1px solid var(--line); }
.agx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 0; }
.agx-row + .agx-row { border-top: 1px solid var(--line); }
.agx-row-who { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.agx-row-who small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-2); }
.agx-chip { display: grid; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.agx-chip > span { grid-area: 1 / 1; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); text-align: center; }
.agx-old { opacity: 0; }
.agx-row--new { margin: 10px -10px 4px; padding: 12px 10px; border-radius: 12px; background: #F3F7FF; }
.agx-row--new + .agx-row { border-top: 0; }
.agx-row--new .agx-now { background: var(--accent); border-color: var(--accent); color: #fff; }
.agx-row--new .agx-old { background: #fff; }
.js [data-play] .agx-old { opacity: 1; }
.js [data-play] .agx-row--new .agx-now { opacity: 0; }
.js [data-play].play .agx-old { animation: agOut 250ms ease 1900ms forwards; }
.js [data-play].play .agx-row--new .agx-now { animation: agIn 250ms ease 1900ms forwards; }
.agx-hist { grid-column: 1 / -1; list-style: none; display: grid; gap: 3px; margin-top: 6px; }
.agx-hist li { display: grid; grid-template-columns: 58px minmax(0, 1fr); font-size: 0.84rem; color: var(--ink-2); }
.agx-hist b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* your own agent: the questions we'd ask */
.agx-ask { padding: 24px; border: 1.5px dashed #C9CACF; border-radius: 20px; }
.agx-ask-h { font: 700 1.3rem/1.2 var(--font-head); letter-spacing: -0.02em; }
.agx-ask ol { list-style: none; display: grid; gap: 8px; margin-top: 16px; }
.agx-ask li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--panel); font-weight: 500; font-size: 0.95rem; }
.agx-ask li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.agx-ask-foot { margin-top: 14px; font-size: 0.9rem; color: var(--ink-2); }

/* 3. Try the enquiry agent (demo + lead card) */
.agd { margin-top: 40px; }
.agd-pick { display: none; }
.agd.is-live .agd-pick {
  display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.agd-pick button {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; cursor: pointer;
  background: none; color: var(--ink-2); font: 600 0.95rem var(--font-body);
  transition: background 180ms ease, color 180ms ease;
}
.agd-pick button:hover { color: var(--ink); }
.agd-pick button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.agd-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; margin-top: 16px; align-items: start; }

.agd-chat {
  background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 60px -40px rgba(10, 10, 11, 0.3);
}
.agd-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.agd-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.agd-who strong { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agd-who span { font-size: 0.78rem; color: var(--ink-2); }
.agd-mini { display: none; }
.agd-reset {
  display: none; margin-left: auto; min-height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  color: var(--accent); font: 600 0.9rem var(--font-body); border-radius: var(--radius-sm); white-space: nowrap;
}
.agd.is-live .agd-reset { display: block; }
.agd-reset:hover { text-decoration: underline; text-underline-offset: 3px; }

.agd-log {
  height: 400px; overflow-y: auto; padding: 18px 18px 12px;
  display: flex; flex-direction: column; gap: 10px; background: var(--panel);
}
.agd-log:focus-visible { outline-offset: -3px; }
.agd-log > :first-child { margin-top: auto; }
.agd-nojs { align-self: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.agd-msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.5; flex: none; }
.agd-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.agd-me { align-self: flex-end; background: #DCF8C6; color: #12351C; border-bottom-right-radius: 4px; }
.agd.is-live .agd-msg { animation: agIn 280ms var(--ease-sig) both; transform: translateY(6px); opacity: 0; }
.agd-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.agd-typing i { background: #9A9CA3; animation: agDot 560ms ease-in-out infinite; }
.agd-typing i:nth-child(2) { animation-delay: 140ms; }
.agd-typing i:nth-child(3) { animation-delay: 280ms; }
.agd-card { display: flex; align-items: center; gap: 12px; border-color: #BFD3F9; background: #F3F7FF; }
.agd-card svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.agd-card strong { display: block; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.agd-card small { font-size: 0.92rem; font-weight: 600; }

.agd-chips { display: none; }
.agd.is-live .agd-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 2px; min-height: 60px; align-content: flex-start; }
.agd-chip {
  min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--ink); font: 500 0.92rem/1.3 var(--font-body); text-align: left;
  transition: border-color 180ms ease, background 180ms ease;
}
.agd-chip:hover { border-color: var(--ink); }
.agd-chip:disabled { opacity: 0.45; cursor: default; }
.agd-chip--person { border-style: dashed; color: var(--ink-2); }
.agd-chip--reset { border-color: var(--ink); font-weight: 600; }

.agd-compose { display: none; }
.agd.is-live .agd-compose { display: flex; gap: 8px; padding: 12px 16px 16px; }
.agd-compose input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  font: 400 1rem var(--font-body); color: var(--ink); background: #fff;
}
.agd-compose input::placeholder { color: #8A8C93; }
.agd-compose input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.agd-send { width: 46px; height: 46px; flex: none; border: 0; border-radius: 12px; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; }
.agd-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agd-send:disabled { opacity: 0.4; cursor: default; }

/* lead card */
.agd-lead { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px 24px 20px; }
.agd-lead-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.agd-lead h3 { font-size: 1.25rem; }
.agd-track { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 18px 0 6px; counter-reset: s; }
.agd-track li {
  position: relative; padding-top: 14px; font-size: 0.8rem; font-weight: 600; color: #6E7076; /* dimmer than ink-2, still 4.8:1 on white */
  transition: color 250ms ease;
}
.agd-track li::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--line); }
.agd-track li::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 400ms var(--ease-sig);
}
.agd-track li.on { color: var(--ink); }
.agd-track li.on::after { transform: scaleX(1); }
.agd-track li[data-s="end"].on::after { background: var(--accent); }
.agd-track li[data-s="end"].on { color: var(--accent); }
.agd-track li.is-handed.on::after { background: var(--ink-2); }
.agd-track li.is-handed.on { color: var(--ink); }

.agd-fields > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.agd-fields > div:first-child { border-top: 0; }
.agd-fields dt { font-size: 0.8rem; color: var(--ink-2); padding-top: 2px; }
.agd-fields dd { font-size: 0.95rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.agd-fields dd.is-empty { font-weight: 400; color: #6E7076; }
.agd-t { display: inline-block; margin: 0 6px 6px 0; padding: 3px 9px; font-size: 0.82rem; font-weight: 600; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.agd-fields dd .agd-t:last-child { margin-bottom: 0; }
.agd-lead-foot { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--ink-2); line-height: 1.5; }

.agd-note { margin-top: 18px; font-size: 0.88rem; color: var(--ink-2); max-width: 72ch; }

/* 4. Built around your business: chips on the left, the agent brief on the right */
.agb { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: start; margin-top: 44px; }
.agb-hint { display: none; }
.js .agb-hint { display: block; margin-bottom: 14px; font-weight: 600; }
.agb-group { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.agb-g { width: 100%; margin-bottom: 4px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.agb-chip {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 16px 8px 14px;
  border: 1px solid #D5D6DA; border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer;
  font: 500 0.94rem/1.3 var(--font-body); text-align: left;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.agb-chip::before {
  content: ''; flex: none; width: 12px; height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 12px 1.6px no-repeat, linear-gradient(currentColor, currentColor) center / 1.6px 12px no-repeat;
}
.agb-chip:hover { border-color: var(--ink); }
.agb-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.agb-chip[aria-pressed="true"]::before { width: 11px; height: 6px; margin: 0 1px 4px 0; background: none; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
html:not(.js) .agb-chip { pointer-events: none; }

.ag-spec { padding: 26px 28px 22px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 30px 60px -40px rgba(10, 10, 11, 0.3); }
.agb-brief { position: sticky; top: 88px; }
.ag-spec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.ag-spec-head > span:first-child { font: 700 1.3rem/1.1 var(--font-head); letter-spacing: -0.02em; }
.agb-from { display: flex; align-items: baseline; gap: 4px 12px; padding-top: 14px; font-size: 0.86rem; color: var(--ink-2); }
.agb-from b { display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px; font-size: 0.82rem; font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ag-spec dl > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.ag-spec dl > div:first-child { border-top: 0; }
.ag-spec dt { font-size: 0.86rem; color: var(--ink-2); padding-top: 1px; }
.ag-spec dd { font-weight: 600; }
.agb-brief dd span { display: block; }
.agb-brief dd span + span { margin-top: 4px; }
.ag-spec dd.is-empty { font-weight: 400; color: #6E7076; }
.agb-foot { padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-2); }
.agb-foot .learn-link { display: flex; width: max-content; max-width: 100%; margin-top: 2px; }

/* row highlight when something changes (lead card and agent brief) */
.agd-fields > div, .agb-brief dl > div { position: relative; }
.agd-fields > div::before, .agb-brief dl > div::before {
  content: ''; position: absolute; inset: 2px -10px; border-radius: 10px; background: rgba(14, 99, 244, 0.08);
  opacity: 0; pointer-events: none;
}
.agd-fields > div.upd::before, .agb-brief dl > div.upd::before { animation: agFlash 1100ms ease forwards; }

/* 5. You stay in control */
.ag-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.ag-rules { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 32px; }
.ag-rules > div { border-top: 1px solid #2A2B30; padding-top: 16px; }
.ag-rules dt { font: 700 1.08rem/1.3 var(--font-head); }
.ag-rules dd { margin-top: 6px; color: var(--dark-ink-2); font-size: 0.96rem; }

.ag-hand {
  margin: 8px 0 0; background: #141518; border: 1px solid #26272C; border-radius: 24px; padding: 18px 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.ag-hand-head { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; color: var(--dark-ink-2); padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid #26272C; }
.ag-hand .ag-tag { color: var(--dark-ink-2); }
.ag-hand .ag-b-in { background: #23242A; border-color: #2F3036; color: #fff; }
.ag-hand .ag-b-in small { color: var(--dark-ink-2); text-align: left; }
.ag-by { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 2px; }
.ag-join { align-self: center; font-size: 0.76rem; font-weight: 600; color: var(--accent-on-dark); padding: 4px 12px; border: 1px solid #2F3036; border-radius: var(--radius-sm); }
.ag-b-team { align-self: flex-end; background: #fff; color: var(--ink); border-bottom-right-radius: 4px; }

.ag-safe { margin-top: 64px; padding-top: 28px; border-top: 1px solid #2A2B30; }
.ag-safe-h { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-on-dark); margin-bottom: 14px; }
.ag-safe ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px 32px; }
.ag-safe li { position: relative; padding-left: 24px; font-size: 0.95rem; line-height: 1.5; color: #D9DADF; }
.ag-safe li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 12px; height: 2px; background: var(--accent-on-dark); }

/* 6. How we build it */
.ag-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 48px; }
.ag-steps li { border-top: 2px solid var(--ink); padding-top: 20px; }
.ag-step-n { display: block; font: 600 2.2rem/1 var(--font-head); color: var(--accent); margin-bottom: 14px; }
.ag-steps h3 { font-size: 1.18rem; margin-bottom: 6px; }
.ag-steps p { color: var(--ink-2); font-size: 0.97rem; }
.ag-pair { margin-top: 36px; }

/* Responsive */
@media (max-width: 1080px) {
  .js .agx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ag-hero { padding-block: 48px 64px; }
  .ag-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .ag-stack { max-width: 540px; }

  .agx-panel { grid-template-columns: 1fr; }
  .agx-txt { padding: 28px 24px 12px; }
  .agx-stage { min-height: 0; padding: 28px 20px; order: -1; } /* the product first, then the words */
  .agx-txt { padding-top: 22px; }
  .agx-stage--phone { padding-top: 32px; }

  .agd-grid { grid-template-columns: 1fr; }
  /* the lead card sits below the chat here, so the head carries a one-line status */
  .agd-mini.on { display: block; font-size: 0.78rem; font-weight: 600; color: var(--accent); }
  .agd.has-status .agd-who span:not(.agd-mini) { display: none; }

  .agb { grid-template-columns: 1fr; gap: 28px; }
  .agb-brief { position: static; }
  .ag-split { grid-template-columns: 1fr; gap: 40px; }
  .ag-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .ag-safe { margin-top: 48px; }
}
@media (max-width: 560px) {
  .ag-hero .dp-h1 { font-size: clamp(2.5rem, 11vw, 3rem); }
  .ag-stack { padding: 6px 8px 8px; border-radius: 24px; }
  .ag-stack-head { padding: 10px 10px 10px 12px; }
  .ag-stack li { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 11px 12px 11px 11px; border-radius: 16px; }
  .ag-stack .ag-ico { width: 40px; height: 40px; padding: 9px; }
  .ag-stack li p { font-size: 0.9rem; }
  .ag-b { font-size: 0.86rem; }

  .agx { margin-top: 32px; }
  .js .agx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .agx-card { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-radius: 14px; }
  .agx-card .ag-ico { width: 36px; height: 36px; padding: 8px; margin: 0; border-radius: 10px; }
  .agx-card strong { font-size: 0.9rem; }
  .agx-card span { display: none; }
  .agx-panel { padding: 8px; border-radius: 22px; margin-top: 12px; }
  .agx-txt { padding: 20px 14px 14px; }
  .agx-stage { padding: 22px 14px; border-radius: 16px; }
  .agx-stage--phone { padding: 26px 8px 0; }
  .ag-phone { width: 290px; max-width: 100%; border-radius: 44px 44px 0 0; padding: 10px 10px 0; }
  .ag-phone-screen { border-radius: 35px 35px 0 0; min-height: 370px; }
  .ag-cal { padding: 14px 12px; }
  .ag-cal-grid { gap: 4px; }
  .ag-cal-grid i { height: 64px; }
  .ag-cal-free b { font-size: 0.62rem; padding: 5px; }
  .ag-quote { padding: 16px 16px 14px; }
  .agx-recs { padding: 2px 14px 4px; }
  .agx-ask { padding: 18px 16px; }

  .agd { margin-top: 32px; }
  .agd.is-live .agd-pick { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; width: 100%; }
  .agd-pick button { padding: 0 10px; }
  .agd-chat, .agd-lead { border-radius: 20px; }
  .agd-head { padding-left: 14px; gap: 10px; }
  .agd-reset { padding: 0 6px; }
  .agd-log { height: 330px; padding: 14px 12px 10px; }
  .agd-msg { max-width: 88%; font-size: 0.93rem; }
  .agd.is-live .agd-chips { padding: 12px 12px 2px; }
  .agd.is-live .agd-compose { padding: 10px 12px 12px; }
  .agd-lead { padding: 18px 18px 16px; }
  .agd-fields > div { grid-template-columns: 84px minmax(0, 1fr); }

  .agb-chip { font-size: 0.9rem; padding: 8px 14px 8px 12px; }
  .ag-spec { padding: 20px 18px 16px; }
  .ag-spec dl > div { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .ag-rules { grid-template-columns: 1fr; gap: 20px; }
  .ag-hand { padding: 16px 14px 18px; }
  .ag-safe ul { grid-template-columns: 1fr; gap: 10px; }
  .ag-steps { grid-template-columns: 1fr; gap: 22px; }
}

/* Reduced motion: final states, no movement */
@media (prefers-reduced-motion: reduce) {
  .js [data-play] .pi, .js [data-play] .pl { opacity: 1; transform: none; animation: none !important; }
  .js [data-play] .pt { display: none; }
  .js [data-play] .agx-old { opacity: 0; animation: none !important; }
  .js [data-play] .agx-row--new .agx-now { opacity: 1; animation: none !important; }
  .js .agx-panel.is-in { animation: none; }
  .agd.is-live .agd-msg { animation: none; opacity: 1; transform: none; }
  .agd-typing i { animation: none; }
  .agd-fields > div.upd::before, .agb-brief dl > div.upd::before { animation: none; }
  .agd-track li::after, .agd-track li, .agd-pick button, .agd-chip, .agx-card, .agb-chip { transition: none; }
}
