/* Muve — AI for your business: the training feed (hero), the five subservice blocks, each with its own
   small living art (a ring, files, the chat and voice switch, the tone switch on a glow, the team), the questions. */

/* ---------- hero: ribbon on the left (data-flip), art over it on an opaque card, copy on paper at the right ---------- */
[data-page="ai"] { --text-2xl: clamp(1.875rem, 1.2rem + 2.4vw, 3.5rem); }
.xh { min-height: 0; }
.xh .phero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; padding-block: clamp(20px, 3.4vh, 44px) calc(clamp(20px, 3vh, 40px) + clamp(20px, 4vw, 64px)); }
.xh .phero__lede { margin-top: clamp(14px, 2vh, 24px); }
.xh .phero__cta { margin-top: clamp(18px, 2.6vh, 30px); }
.xh .phero__copy { order: 2; min-width: 0; }
.xh .phero__art { order: 1; }
.xh .crumb { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 4px 14px; margin-bottom: 22px; border-radius: var(--r-pill); background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08); }
.xh .crumb a { display: inline-flex; align-items: center; min-height: 32px; }
@media (min-width: 901px) and (max-width: 1180px), (min-width: 901px) and (max-height: 820px) {
  .feed { padding: 12px; }
  .xh .phero__grid { padding-top: 10px; }
  .feed__again { min-height: 32px; }
  .feed__core { min-height: 34px; }
  .feed__out { padding: 9px; gap: 6px; }
  .feed__bar { margin-bottom: 8px; }
  .feed__cites { display: none; }
  .feed__in, .feed__reply { font-size: .8125rem; line-height: 1.4; padding: 8px 10px; }
  .feed__hold { font-size: .8125rem; padding: 7px 10px; }
  .feed__doc span:last-child { display: none; }
}
@media (max-width: 900px) {
  .feed__again { min-height: 44px; }
  .xh .phero__grid { grid-template-columns: 1fr; }
  .xh .phero__copy { order: 1; }
  .xh .phero__art { order: 2; }
  .xh .mesh { top: auto; height: var(--mesh-h, 56%); }
  .xh .crumb { font-size: .8125rem; flex-wrap: nowrap; white-space: nowrap; gap: 0 5px; padding: 0 12px; margin-bottom: 14px; max-width: 100%; }
  .xh .crumb a { min-height: 44px; }
}

.feed { position: relative; display: grid; gap: 0; padding: clamp(14px, 1.6vw, 20px); border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-2); }
.js .feed { animation: feed-in var(--t-enter) var(--ease-out) both; }
@keyframes feed-in { from { opacity: 0; translate: 0 26px; } }
.feed__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.feed__who { font-size: var(--text-sm); color: var(--ink-2); margin-right: auto; }
.feed__again { min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); font: 500 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--paper-2); color: var(--ink); transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .feed__again:hover { background: var(--ink); color: var(--paper); } }
.feed__again:focus-visible { background: var(--ink); color: var(--paper); }

.feed__src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.feed__doc { display: grid; align-content: start; gap: 5px; padding: 10px; border-radius: 8px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .1); font-size: .75rem; line-height: 1.3; color: var(--ink-2); transition: background-color var(--t-panel) var(--ease-out), box-shadow var(--t-panel) var(--ease-out), translate var(--t-panel) var(--ease-out); }
.feed__doc b { font: 500 .75rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); padding-bottom: 5px; border-bottom: 1px solid rgba(11, 27, 51, .14); }
/* 11/20: source lines wrap at every width, never "…" */
.feed__doc span { overflow-wrap: break-word; }
.feed__doc.is-read { background: var(--white); box-shadow: inset 0 0 0 2px var(--blue-ink); translate: 0 -4px; }
.feed__wires { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; height: 34px; }
.feed__wires i { position: relative; justify-self: center; width: 1px; height: 22px; background: rgba(11, 27, 51, .22); }
.feed__wires i::after { content: ""; position: absolute; left: -3px; top: 0; width: 7px; height: 7px; background: var(--blue); animation: feed-drop 1.8s var(--ease-io) infinite; animation-delay: calc(var(--n) * 420ms); }
@keyframes feed-drop { from { translate: 0 -4px; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { translate: 0 24px; opacity: 0; } }
.feed__wires b { position: absolute; left: 16.666%; right: 16.666%; top: 22px; height: 1px; background: rgba(11, 27, 51, .22); }
.feed__wires b::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 12px; background: rgba(11, 27, 51, .22); }
.feed__core { justify-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: var(--text-sm); font-weight: 400; }
.feed__core .cellmark { background: var(--cyan); }
.feed__cells { display: inline-grid; grid-template-columns: repeat(8, 6px); gap: 2px; }
.feed__cells i { width: 6px; height: 6px; background: var(--cyan); opacity: .28; animation: feed-learn 2.4s steps(1) infinite; animation-delay: calc(var(--k, 0) * 150ms); }
.feed__cells i:nth-child(1) { --k: 0; } .feed__cells i:nth-child(2) { --k: 1; } .feed__cells i:nth-child(3) { --k: 2; } .feed__cells i:nth-child(4) { --k: 3; }
.feed__cells i:nth-child(5) { --k: 4; } .feed__cells i:nth-child(6) { --k: 5; } .feed__cells i:nth-child(7) { --k: 6; } .feed__cells i:nth-child(8) { --k: 7; }
@keyframes feed-learn { 0% { opacity: 1; } 50% { opacity: .28; } }
.feed__out { position: relative; display: grid; gap: 8px; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--paper); }
.feed__out::before { content: ""; position: absolute; left: 50%; top: -16px; width: 1px; height: 16px; background: rgba(11, 27, 51, .22); }
.feed__in, .feed__reply { display: grid; gap: 4px; max-width: 92%; padding: 10px 12px; border-radius: 12px; font-size: var(--text-sm); line-height: 1.45; transition: opacity var(--t-panel) var(--ease-out), translate var(--t-panel) var(--ease-out); }
.feed__in { background: var(--white); color: var(--ink); border-bottom-left-radius: 2px; box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08); }
.feed__reply { justify-self: end; background: var(--blue-ink); color: #ffffff; border-bottom-right-radius: 2px; min-height: 5.4em; }
.feed__meta { font: 500 .75rem/1.2 var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.feed__reply .feed__meta { color: #dbe7ff; }
.feed__cites { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.feed__cites span { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border-radius: 4px; background: var(--white); font: 500 .75rem/1 var(--mono); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .1); transition: opacity var(--t-panel) var(--ease-out), translate var(--t-panel) var(--ease-out); }
.feed__cites i { width: 7px; height: 7px; background: var(--blue-ink); }
.feed__hold { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--amber-ink); font-size: var(--text-sm); font-weight: 400; color: var(--ink); transition: opacity var(--t-panel) var(--ease-out), translate var(--t-panel) var(--ease-out); }
.feed__hold i { width: 8px; height: 8px; background: var(--amber-ink); flex: none; }
/* the play-through (JS sets data-phase; with no JS everything is simply there) */
/* 11/20: the conversation is never blank while the replay runs. The finished exchange stays in place, and the part that's
   about to happen waits dimmed, then lights up. */
.feed[data-phase="read"] :is(.feed__in, .feed__reply, .feed__hold, .feed__cites span), .feed[data-phase="ask"] :is(.feed__reply, .feed__hold, .feed__cites span), .feed[data-phase="answer"] .feed__hold { opacity: .3; }
.feed[data-phase="answer"] .feed__cites span:not(.is-lit) { opacity: .3; }

/* ---------- the two offerings ---------- */
.aio__strip { display: grid; gap: 14px; margin-bottom: clamp(40px, 6vw, 80px); }
.aio__strip .label { display: inline-flex; align-items: center; gap: 10px; color: var(--hue-ink); }
.aio__strip [data-marquee] { --mq-gap: 12px; padding-block: 6px; }
.aio__list { font-size: var(--text-lg); font-weight: 400; letter-spacing: -.01em; white-space: nowrap; }
.aio__list li { --c: var(--violet); --on: #ffffff; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: var(--r-pill); background: var(--c); color: var(--on); box-shadow: var(--sh-1); }
.aio__list i { width: 9px; height: 9px; background: currentColor; flex: none; }
.aio__list li:nth-child(4n+2) { --c: var(--cyan); --on: var(--ink); }
.aio__list li:nth-child(4n+3) { --c: var(--blue); }
.aio__list li:nth-child(4n) { --c: var(--amber); --on: var(--ink); }
@media (prefers-reduced-motion: reduce) { .aio__list { white-space: normal; gap: 8px; } }
.aio__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.hubb { grid-column: span 6; display: grid; gap: 14px; align-content: start; padding: clamp(20px, 2.6vw, 36px); border-radius: 18px; border-top: 5px solid var(--hue); min-width: 0; }
.hubb--fo { grid-column: span 7; } .hubb--as { grid-column: span 5; }
.hubb--train { grid-column: 1 / -1; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.hubb__say { display: grid; gap: 14px; justify-items: start; }
.hubb .tag i { background: var(--hue-ink); }
.hubb .t-body { max-width: 48ch; }
.hubb > .next, .hubb__say .next { color: var(--ink); margin-top: auto; justify-self: start; }
.hubb > .wash { border-radius: 0 0 18px 18px; }
.hubb--write { overflow: hidden; }
.hubb--write > .mesh { inset: 30% -10% -10% -10%; }
/* chat and voice inside the chat block */
.cv { display: grid; gap: 12px; }
.cv__pick { justify-self: start; display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
.cv__btn, .tone__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: .9375rem; font-weight: 400; background: transparent; color: var(--ink); transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); }
.cv__btn .ic { width: 18px; height: 18px; flex: none; }
.cv__btn { white-space: nowrap; }
@media (max-width: 400px) { .cv__pick { justify-self: stretch; grid-auto-columns: minmax(0, 1fr); } .cv__btn { padding: 0 10px; } }
@media (hover: hover) and (pointer: fine) { :is(.cv__btn, .tone__btn):not([aria-pressed="true"]):hover { background: var(--white); color: var(--ink); } }
:is(.cv__btn, .tone__btn):not([aria-pressed="true"]):focus-visible { background: var(--white); color: var(--ink); }
:is(.cv__btn, .tone__btn)[aria-pressed="true"] { background: var(--hue-ink); color: #ffffff; box-shadow: var(--sh-1); }
.cv__stage { display: grid; gap: 12px; align-content: start; min-height: 250px; padding: clamp(14px, 1.8vw, 22px); border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-1); }
.cv__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--text-sm); color: var(--ink-2); }
.cv__q { justify-self: start; max-width: 80%; padding: 10px 14px; border-radius: 14px 14px 14px 2px; background: var(--paper-2); font-size: var(--text-base); color: var(--ink); }
.cv__a { justify-self: end; max-width: 90%; min-height: 6.2em; padding: 12px 14px; border-radius: 14px 14px 2px 14px; background: var(--blue-ink); color: #ffffff; font-size: var(--text-base); line-height: 1.5; }
.cv__a .w { opacity: .42; transition: opacity 160ms linear; }
/* typed answers (ai.js type()): every word is in place from the start, unlit words wait at low opacity */
.is-typing .tw { opacity: .18; transition: opacity 140ms linear; }
.is-typing .tw.is-on { opacity: 1; }
.cv__a .w.is-said { opacity: 1; }
.cv__wave { display: none; align-items: center; gap: 3px; height: 56px; padding: 0 14px; border-radius: 12px; background: var(--paper); }
.cv__wave i { display: block; flex: 1 1 0; max-width: 8px; height: 6px; background: var(--cyan-ink); }
.cv[data-mode="voice"] .cv__wave { display: flex; }
.cv[data-mode="voice"] .cv__wave.is-on i { animation: cv-talk 900ms var(--ease-io) infinite alternate; }
.cv__wave i:nth-child(3n) { animation-delay: -300ms; } .cv__wave i:nth-child(3n+1) { animation-delay: -620ms; } .cv__wave i:nth-child(4n) { animation-delay: -140ms; } .cv__wave i:nth-child(5n) { animation-delay: -480ms; }
@keyframes cv-talk { from { scale: 1 1; } to { scale: 1 6.5; } }
.cv[data-mode="voice"] .cv__a { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .1); border-radius: 12px; justify-self: stretch; max-width: none; }
/* the team, each one a row of squares filling as they learn */
.crew { position: relative; display: grid; gap: 10px; padding: clamp(14px, 2vw, 24px); border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-1); }
.crew p { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; gap: 12px; font: 500 .75rem/1.2 var(--mono); letter-spacing: .04em; color: var(--ink); }
.crew b { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.crew i { height: 18px; background: var(--amber); animation: crew-fill 6s steps(1) infinite; animation-delay: calc(var(--n) * 500ms + var(--k, 0) * 380ms); opacity: .22; }
.crew p:nth-child(2) i { background: var(--orange); } .crew p:nth-child(3) i { background: var(--pink); } .crew p:nth-child(4) i { background: var(--violet); }
.crew i:nth-child(2) { --k: 1; } .crew i:nth-child(3) { --k: 2; } .crew i:nth-child(4) { --k: 3; } .crew i:nth-child(5) { --k: 4; } .crew i:nth-child(6) { --k: 5; }
@keyframes crew-fill { 0% { opacity: 1; } 78% { opacity: .22; } }
.crew .ic-tile { position: absolute; right: 12px; top: -18px; }
@media (max-width: 900px) { .hubb, .hubb--fo, .hubb--as { grid-column: 1 / -1; } .hubb--train { grid-template-columns: 1fr; } }
.aio__art { position: relative; display: block; min-height: 132px; margin-block: 6px; padding: 16px; border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-1); transition: translate var(--t-panel) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .hubb:hover .aio__art { translate: 0 -4px; } }
/* a ring that turns into an answer */
.ringbar { display: flex; align-items: center; gap: 4px; height: 44px; }
.ringbar i { width: 8px; height: 8px; background: var(--green-ink); animation: ring-beat 1.6s var(--ease-io) infinite; animation-delay: calc(var(--n) * 90ms); }
@keyframes ring-beat { 0%, 100% { scale: 1 1; } 40% { scale: 1 4.2; } }
.ringlog { display: grid; gap: 6px; margin-top: 12px; font: 500 .75rem/1.2 var(--mono); letter-spacing: .04em; color: var(--ink-2); }
.ringlog span { display: flex; align-items: center; gap: 8px; animation: ring-line 6s var(--ease-io) infinite; animation-delay: calc(var(--n) * 2s); opacity: .45; }
.ringlog span::before { content: ""; width: 7px; height: 7px; background: var(--green-ink); }
@keyframes ring-line { 0%, 30% { opacity: 1; } 36%, 100% { opacity: .45; } }
/* files, one of them answering */
.aio__art--files { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }
.filetab { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 4px 4px 0 0; background: var(--paper-2); font: 500 .75rem/1 var(--mono); color: var(--ink); animation: file-pick 8s steps(1) infinite; animation-delay: calc(var(--n) * 2s); }
@keyframes file-pick { 0% { background: var(--blue-ink); color: #ffffff; } 25%, 100% { background: var(--paper-2); color: var(--ink); } }
.fileans { flex-basis: 100%; display: grid; gap: 7px; margin-top: 10px; }
.fileans i { height: 7px; background: rgba(11, 27, 51, .14); transform-origin: 0 50%; animation: file-write 2s var(--ease-out) infinite; }
.fileans i:nth-child(2) { width: 82%; animation-delay: 160ms; }
.fileans i:nth-child(3) { width: 54%; animation-delay: 320ms; }
@keyframes file-write { 0% { scale: 0 1; } 45%, 100% { scale: 1 1; } }

.tone { display: grid; gap: 14px; padding: clamp(18px, 2.2vw, 28px); border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-2); }
.tone__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--text-sm); color: var(--ink-2); }
.tone__pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
.tone__q { justify-self: start; padding: 10px 14px; border-radius: 14px 14px 14px 2px; background: var(--paper-2); color: var(--ink); }
.tone__a { min-height: 7.6em; padding: 14px 16px; border-radius: 14px 14px 2px 14px; background: var(--violet-ink); color: #ffffff; font-size: var(--text-lg); line-height: 1.45; transition: opacity var(--t-hover) var(--ease-out); }
.tone.is-swap .tone__a > span { opacity: 0; }
.tone__a > span { transition: opacity var(--t-hover) var(--ease-out); }
.tone__price { display: inline-block; padding: 0 6px; background: var(--amber); color: var(--ink); font-weight: 500; }
.tone__src { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--ink-2); }
.tone__src i { width: 8px; height: 8px; background: var(--amber-ink); flex: none; }

/* ---------- questions ---------- */
.aiq__list { padding: clamp(8px, 1.6vw, 20px) clamp(16px, 2.4vw, 32px) clamp(16px, 2vw, 28px); border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(11, 27, 51, .08), var(--sh-2); border-top: 5px solid var(--blue); }
.aiq__list .qa:first-of-type { border-top: 0; }
.aiq__list { background: var(--paper); }
.aiq__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.aiq__head { display: grid; gap: 20px; }
.aiq__head .label { color: var(--hue-ink); }
.aiq__human { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--r); background: var(--blue-ink); color: #ffffff; box-shadow: var(--sh-2); }
.aiq__human .ic { color: var(--cyan); margin-top: 2px; }
.aiq__human .link { color: #ffffff; text-decoration-color: rgba(255, 255, 255, .6); }
@media (hover: hover) and (pointer: fine) { .aiq__human .link:hover { color: #ffffff; text-decoration-color: #ffffff; } }
.aiq__human .link:focus-visible { color: #ffffff; text-decoration-color: #ffffff; outline-color: #ffffff; }
.aiq__human a, .aiq__more a { display: inline-block; padding-block: 4px; }
.aiq__more { color: var(--ink-2); max-width: 46ch; }
.aiq__list .next { margin-top: 20px; }
@media (max-width: 900px) { .aiq__grid { grid-template-columns: 1fr; } .aiq__human a, .aiq__more a { display: inline; padding-block: 11px; } .aiq__human p, .aiq__more { line-height: 2.7; } }

@media (prefers-reduced-motion: reduce) {
  .js .feed, .feed__wires i::after, .feed__cells i, .ringbar i, .ringlog span, .filetab, .fileans i, .cv[data-mode="voice"] .cv__wave.is-on i { animation: none; }
  .feed__doc, .feed__in, .feed__reply, .feed__hold, .feed__cites span, .aio__art, .cv__a .w, .tone__a, .tone__a > span, .feed__again, .cv__btn, .tone__btn { transition: none; }
  .feed__wires i::after { opacity: 1; translate: 0 12px; }
  .cv__wave i:nth-child(odd) { scale: 1 4; } .cv__wave i:nth-child(3n) { scale: 1 6; }
  .cv__a .w { opacity: 1; }
}

.aiq__close { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; margin-top: clamp(32px, 5vw, 64px); padding-top: clamp(20px, 3vw, 32px); border-top: 1px solid rgba(11, 27, 51, .14); }
.aiq__close .t-h3 { max-width: 30ch; }
@media (max-width: 760px) { .aiq__close { grid-template-columns: 1fr; justify-items: start; } .aiq__close .btn { white-space: normal; min-height: 48px; padding-block: 10px; line-height: 1.35; } }

/* ---------- 11/19 phone pass: no one-word last lines in headings, phone numbers never split ---------- */
@media (max-width: 760px) { main :is(h1, h2, h3) { text-wrap: balance; } }
main a[href^="tel:"] { white-space: nowrap; }
/* the three source cards are ~100px wide on a phone: let their lines wrap instead of cutting the words off */
@media (max-width: 560px) { .feed__doc span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; } }
@media (pointer: coarse) { .feed__again { min-height: 44px; } }
