/* Atlas site: the two live demos (2026-11-06): the agent builder (Agents) and the side-by-side comparison (Home).
   The finished state is the default look; demo.js?v=8b4aa42c4a arms a demo (.is-armed: steps hidden, switch off) and lights each step in
   turn (.on). Without JavaScript, or with Reduce Motion, the finished state is all anyone sees. Colours are the app's own
   (styles.css?v=41fb184673 --app-*); the sun appears only on the person's yes. */

/* shared parts */
.app-tile { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; }
.a-blue { background: var(--app-blue-bg); color: var(--app-blue); }
.a-green { background: var(--app-green-bg); color: var(--app-green); }
.a-coral { background: var(--app-coral-bg); color: var(--app-coral); }
.a-red { background: var(--app-red-bg); color: var(--app-red); }
.a-violet { background: var(--app-violet-bg); color: var(--app-violet); }
.a-sun { background: var(--soft); color: var(--amber-ink); }
.chip-s { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  line-height: 1; white-space: nowrap; }
.chip-s.ok { background: var(--app-green-bg); color: #2f6e44; }
.chip-s.ask { background: var(--soft); color: var(--amber-ink); }
.demo-replay { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; margin: 16px auto 0; border: 1px solid var(--line-2);
  border-radius: 999px; background: #fff; color: var(--ink-2); font: 500 13.5px/1 "Inter", system-ui, sans-serif; cursor: pointer; }
.demo-replay:hover { color: var(--ink); border-color: var(--ink-3); }
[data-demo] { text-align: left; }
[data-demo] > .demo-replay { display: flex; }
[data-demo] > .demo-replay[hidden] { visibility: hidden; }   /* keeps its space: no layout shift when it appears */

/* the steps: shown by default; while armed, each waits for .on */
@media (prefers-reduced-motion: no-preference) {
  .is-armed [data-s].on { transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }   /* hiding on arm is instant: no ghost */
  .is-armed [data-s]:not(.on) { opacity: 0; transform: translateY(10px); }
}

/* ---------- Agent builder (Agents hero) ---------- */
.builder-sec { padding: 4px 0 40px; }
.bld { position: relative; max-width: 900px; margin: 0 auto; }
.bld-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.bld-tab { height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2);
  font: 500 14.5px/1 "Inter", system-ui, sans-serif; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.bld-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.bld-tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bld-win { overflow: hidden; border: 1px solid var(--line-2); border-radius: 24px; background: #fff; box-shadow: var(--shadow-soft); }
.bld-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #faf9f7; font-size: 13px; color: var(--ink-2); }
.bld-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e3e0da; }
.bld-bar span { margin-left: 10px; font-weight: 500; }
.bld-body { padding: 26px; background: #fbfaf8; }
.bld-card[hidden] { display: none; }
.bld-lab { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bld-input { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 12px 12px 12px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: #fff;
  font-size: 17px; line-height: 1.45; color: var(--ink); box-shadow: 0 1px 2px rgba(29, 28, 26, .04); }
.bld-typed { flex: 1; min-width: 0; }
.bld-caret { display: none; width: 1.5px; height: 20px; background: var(--ink); }
.is-typing .bld-caret { display: inline-block; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.bld-send { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-left: 8px; border-radius: 50%; background: var(--ink); color: #fff; }
.bld-agent { margin-top: 16px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 18px; background: #fff; }
.bld-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.bld-head img { width: 44px; height: 44px; border-radius: 50%; background: var(--field); }
.bld-head b { display: block; font-size: 17px; letter-spacing: -0.015em; }
.bld-head div span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-2); }
.bld-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 16px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--line); }
.bf-k { padding-top: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bf-v { font-size: 15px; line-height: 1.5; color: var(--ink); }
.bf-v .ic { vertical-align: -3px; margin-right: 4px; color: var(--ink-2); }
.bf-app { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.bf-app + .bf-app { margin-top: 10px; }
.bf-app b { font-size: 15px; font-weight: 600; }
.bf-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.bld-try { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fdfcfa; }
.bld-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 600; transition: transform .15s ease, background-color .2s ease; }
.bld-btn.press { transform: scale(.96); background: var(--field); }
.bld-result { font-size: 14px; color: #2f6e44; }
.bld-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.bld-switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--app-green); transition: background-color .3s ease; }
.bld-switch i { position: absolute; top: 3px; left: 21px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: left .35s var(--ease-out); }
.is-armed .bld-switch:not(.is-on) { background: #d9d6cf; }
.is-armed .bld-switch:not(.is-on) i { left: 3px; }
/* the words of the sentence and the rows they become: one colour each (job violet, when coral, apps green) */
.ph { border-radius: 6px; padding: 1px 3px; margin: 0 -3px; transition: background-color .35s ease, box-shadow .35s ease; }
.ph-job { background: var(--app-violet-bg); box-shadow: inset 0 -1.5px 0 var(--app-violet); }
.ph-when { background: var(--app-coral-bg); box-shadow: inset 0 -1.5px 0 var(--app-coral); }
.ph-apps { background: var(--app-green-bg); box-shadow: inset 0 -1.5px 0 var(--app-green); }
.is-armed .ph:not(.lit) { background: transparent; box-shadow: none; }
.k-job .bf-k { color: #5a45b0; } .k-when .bf-k { color: #b84a30; } .k-apps .bf-k { color: #2f7a48; }   /* deeper shades: 4.5:1 or more on white */
.bld-fly { position: absolute; z-index: 5; padding: 2px 8px; border-radius: 8px; font-size: 15px; line-height: 1.45; white-space: nowrap; pointer-events: none;
  box-shadow: 0 10px 24px -12px rgba(29, 28, 26, .35); }
.bld-fly.ph-job { background: var(--app-violet-bg); color: #4f3a9e; } .bld-fly.ph-when { background: var(--app-coral-bg); color: #9d3a26; } .bld-fly.ph-apps { background: var(--app-green-bg); color: #2f6e44; }
/* the creature that names the agent pops in */
@media (prefers-reduced-motion: no-preference) { .is-armed .bld-head.on img { animation: bld-pop .7s cubic-bezier(.3, 1.5, .5, 1) both; } }
@keyframes bld-pop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* the trial: what it found last week, as cards */
.bld-res { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin: 2px 0 0; padding: 0; }
.bld-res li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
  font-size: 13.5px; font-weight: 500; box-shadow: 0 6px 16px -14px rgba(29, 28, 26, .5); }
.bld-res .app-tile { width: 24px; height: 24px; border-radius: 7px; }
@media (prefers-reduced-motion: no-preference) {
  .is-armed [data-r].on { transition: opacity .35s var(--ease-out), transform .45s cubic-bezier(.3, 1.4, .5, 1); }
  .is-armed [data-r]:not(.on) { opacity: 0; transform: translateY(-12px) scale(.96); }
}
@media (max-width: 640px) {
  .bld-body { padding: 16px; }
  .bld-input { font-size: 16px; }
  .bld-row { grid-template-columns: minmax(0, 1fr); }
  .bld-row .bf-k { padding-top: 0; }
  .bld-tab { height: 44px; }
}

/* ---------- How Atlas is different: the same request, side by side (Home) ---------- */
.cmp { display: grid; gap: 18px; max-width: 1080px; margin: 0 auto; }
@media (min-width: 900px) { .cmp { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } .cmp > .demo-replay { grid-column: 1 / -1; } }
.cmp-panel { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-2); border-radius: 24px; background: #fff; }
.cmp-atlas { box-shadow: var(--shadow-soft); }
.cmp-lab { display: flex; align-items: center; gap: 4px; padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.cmp-atlas .cmp-lab { color: var(--ink); }
.cmp-lab i { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.cmp-screen { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: #fbfaf8; }
.cmp-chat .cmp-screen { background: #f7f6f3; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.5; }
.msg.me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--ink); color: #fff; }
.msg.ai { align-self: flex-start; border-bottom-left-radius: 6px; border: 1px solid var(--line-2); background: #fff; color: #3d3b38; }
.cmp-steps { list-style: none; counter-reset: st; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; }
.cmp-steps li { counter-increment: st; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 6px; border: 1px dashed var(--ink-3);
  border-radius: 999px; font-size: 13px; color: var(--ink-2); background: #fff; }
.cmp-steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--field);
  font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.cmp-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 14px 15px; border: 1px solid var(--line-2);
  border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(29, 28, 26, .04), 0 12px 24px -20px rgba(29, 28, 26, .3); }
.cmp-card b { display: block; font-size: 14.5px; }
.cmp-card div span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cmp-card > .chip-s, .cmp-card > .cmp-wait { grid-column: 2; justify-self: start; margin-top: 6px; }
.cmp-wait { display: inline-flex; align-items: center; gap: 8px; }
.cmp-send { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 999px; background: var(--sun); color: var(--ink);
  font-size: 13px; font-weight: 600; transition: transform .15s ease; }
.cmp-send { position: relative; }
.cmp-send.press { transform: scale(.92); }
.cmp-send.tap::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--sun); border-radius: 999px; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .cmp-send.tap::after { animation: cmp-tap .6s var(--ease-out); } }
@keyframes cmp-tap { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
.cmp-mail .cmp-wait { display: none; }
.is-armed .cmp-mail:not(.is-sent) .cmp-wait { display: inline-flex; }
.is-armed .cmp-mail:not(.is-sent) .cmp-sent { display: none; }
.cmp-note { padding: 14px 22px 18px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 767px) {
  .cmp-screen { padding: 16px; }
  .cmp-atlas .msg.me { display: none; }   /* phones: the panels stack, so the same request is shown once */
  .msg { font-size: 16px; }
  .cmp-card div span { font-size: 15px; }
}
/* very narrow phones (320 px): status chips in the comparison may wrap instead of widening the page */
@media (max-width: 400px) { .cmp-card .chip-s { white-space: normal; height: auto; min-height: 24px; padding-top: 4px; padding-bottom: 4px; line-height: 1.3; } }
