/* features (v3, f1): value-led bento. Card style follows ai V1: white card, pastel visual panel, text below. */
.fx { --fx-peach: #FFE6D6; --fx-pink: #FFE1EC; --fx-lilac: #ECE6FF; --fx-mint: #DFF3E8; --fx-sand: #FBF1E4; }
.fx-mk { display: inline-block; width: 18px; height: 18px; flex: none; background: var(--c, #1B1713);
  -webkit-mask: var(--u) center / contain no-repeat; mask: var(--u) center / contain no-repeat; }
.fx-mk.xs { width: 13px; height: 13px; }
.fx-mk.sm { width: 16px; height: 16px; }
.fx-ic { width: 18px; height: 18px; flex: none; }

.fx-head { max-width: 860px; }
.fx-head .tb-lead { margin-top: 18px; max-width: 620px; }

.fx-grid { margin-top: 52px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.fx-card { background: var(--sheet); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.fx-vis { flex: 1; border-radius: 12px; padding: 26px; display: flex; align-items: center; justify-content: center; min-height: 230px;
  background: linear-gradient(140deg, var(--g1, var(--fx-peach)) 0%, var(--g2, var(--fx-pink)) 100%); }
.fx-txt { padding: 18px 14px 12px; }
.fx-txt h3 { margin: 0; font: 600 19px/1.25 var(--font); letter-spacing: -0.02em; color: var(--ink); }
.fx-txt p { margin: 6px 0 0; font: 400 15px/1.5 var(--font); color: var(--ink-2); max-width: 520px; }

.c-a2a { --g1: #FFF3E9; --g2: var(--fx-lilac); }
.c-kb { --g1: var(--fx-sand); --g2: var(--fx-mint); }
.c-meet { --g1: var(--fx-lilac); --g2: #F6F1FF; }
.c-pay { --g1: var(--fx-mint); --g2: #F1FAF5; }
.c-mem { --g1: var(--fx-pink); --g2: #FFF4EE; }

/* mini cards: text + a small UI line, no big panel */
.fx-mini { padding: 18px 20px; gap: 14px; justify-content: space-between; }
.fx-mini .fx-txt { padding: 0; }
.fx-mini .fx-txt h3 { font-size: 16.5px; }
.fx-mini .fx-txt p { font-size: 14px; margin-top: 4px; }

/* ---------- agents understand agents ---------- */
.fx-a2a { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, .9fr) 28px minmax(0, 1.15fr); align-items: center; gap: 10px; }
.fx-page { position: relative; height: 250px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); overflow: hidden; }
.fx-page-bar { display: flex; align-items: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fx-page-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.fx-page-bar em { margin-left: 8px; font: 500 11px/1 var(--font); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-page-b { padding: 14px; transition: opacity .6s var(--ease), filter .6s var(--ease); }
.fx-page-h { width: 64%; height: 14px; border-radius: 4px; background: #E9DFD3; margin-bottom: 12px; }
.fx-page-l { display: grid; gap: 7px; }
.fx-page-l i { display: block; height: 6px; border-radius: 3px; background: #F0E8DE; }
.fx-page-c { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.fx-page-c i { height: 40px; border-radius: 8px; background: var(--soft); }
.fx-scan { position: absolute; top: 34px; bottom: 0; left: 0; width: 46px; transform: translateX(-60px); opacity: 0;
  background: linear-gradient(90deg, rgba(236, 230, 255, 0), rgba(214, 200, 255, .75), rgba(236, 230, 255, 0)); }
.fx-tok { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px;
  font: 600 11.5px/1 var(--font); background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.fx-tok.old { color: var(--muted); }
.fx-arrow { display: grid; place-items: center; color: var(--muted); }
.fx-json { position: relative; padding: 14px 14px 46px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card);
  font: 500 12.5px/1.75 var(--font); color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 210px; }
.fx-json p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-json .i { padding-left: 12px; }
.fx-json s { text-decoration: none; color: #8A5A2B; }
.fx-json u { text-decoration: none; color: #2F7A55; }
.fx-json .fx-tok { background: var(--fx-mint); color: #1F6A45; box-shadow: none; }
.fx-talk { display: grid; gap: 9px; }
.fx-msg { display: flex; gap: 8px; align-items: flex-end; }
.fx-msg-av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #fff; box-shadow: var(--shadow-card); display: grid; place-items: center; }
.fx-msg-av.img { border-radius: 9px; object-fit: cover; }
.fx-msg p { margin: 0; padding: 9px 12px; border-radius: 14px 14px 14px 5px; background: #fff; box-shadow: var(--shadow-card);
  font: 400 13.5px/1.4 var(--font); color: var(--ink); }
.fx-msg small { display: block; font: 600 11px/1 var(--font); color: var(--muted); margin-bottom: 5px; }
.fx-done { justify-self: start; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px;
  background: var(--tag-ok-bg); color: var(--tag-ok-ink); font: 600 13px/1 var(--font); }
.fx-done .fx-ic { width: 15px; height: 15px; }

/* sequence: data-s 0 page · 1 scan · 2 data · 3 question · 4 answer + outcome */
.fx-json .i, .fx-json .fx-tok, .fx-msg, .fx-done { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.fx-json .i { transition-delay: calc(var(--k) * .14s); }
.fx-a2a:not([data-fxs="0"]) .fx-json .i,
.fx-a2a[data-fxs="2"] .fx-json .fx-tok, .fx-a2a[data-fxs="3"] .fx-json .fx-tok, .fx-a2a[data-fxs="4"] .fx-json .fx-tok,
.fx-a2a[data-fxs="3"] .fx-msg.q, .fx-a2a[data-fxs="4"] .fx-msg, .fx-a2a[data-fxs="4"] .fx-done { opacity: 1; transform: none; }
.fx-a2a[data-fxs="4"] .fx-msg.a { transition-delay: .1s; }
.fx-a2a[data-fxs="4"] .fx-done { transition-delay: .7s; }
.fx-a2a[data-fxs="1"] .fx-scan { animation: fx-scan 1.4s var(--ease) forwards; }
.fx-a2a:not([data-fxs="0"]):not([data-fxs="1"]) .fx-page-b { opacity: .45; filter: blur(1.2px); }
@keyframes fx-scan { 0% { transform: translateX(-60px); opacity: 1; } 100% { transform: translateX(260px); opacity: 1; } }
.fx.static .fx-json .i, .fx.static .fx-json .fx-tok, .fx.static .fx-msg, .fx.static .fx-done { transition: none; }

/* ---------- knowledge base ---------- */
.fx-kb { width: 100%; max-width: 460px; display: grid; gap: 10px; }
.fx-src { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-card); }
.fx-src li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 20px; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font: 400 13.5px/1.3 var(--font); }
.fx-src li + li { box-shadow: 0 -1px 0 var(--line); }
.fx-src li .fx-ic { color: var(--muted); width: 17px; height: 17px; }
.fx-src b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-src small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fx-ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--fx-mint); color: #1F6A45; }
.fx-ok .fx-ic { width: 12px !important; height: 12px !important; color: inherit !important; }
.fx-kb-ans { padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.fx-kb-q { margin: 0; font: 500 12.5px/1.3 var(--font); color: var(--muted); }
.fx-kb-a { margin: 4px 0 8px; font: 500 14.5px/1.35 var(--font); color: var(--ink); }
.fx-ref { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--soft); font: 500 11.5px/1 var(--font); color: var(--ink-2); }
.fx-ref .fx-ic { width: 13px; height: 13px; }

/* ---------- meetings ---------- */
.fx-meet { width: 100%; max-width: 360px; padding: 12px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.fx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fx-days span { display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 10px; }
.fx-days small { font: 500 11px/1 var(--font); color: var(--muted); }
.fx-days b { font: 600 15px/1 var(--font); }
.fx-days .on { background: var(--ink); color: #fff; }
.fx-days .on small { color: rgba(255, 255, 255, .7); }
.fx-times { margin-top: 10px; display: grid; }
.fx-time { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 8px; min-height: 30px; }
.fx-time > small { font: 500 11.5px/1 var(--font); color: var(--muted); }
.fx-time > i { height: 1px; background: var(--line); }
.fx-ev { margin: 4px 0; padding: 9px 11px; border-radius: 10px; background: var(--fx-lilac); box-shadow: inset 3px 0 0 #9C8BE8; }
.fx-ev b { display: block; font: 600 13.5px/1.2 var(--font); }
.fx-ev > small { display: block; font: 400 12px/1.3 var(--font); color: var(--ink-2); margin: 2px 0 7px; }
.fx-by { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--ink); color: #fff; font: 600 11px/1 var(--font); }

/* ---------- payment ---------- */
.fx-pay { width: 100%; max-width: 300px; display: grid; gap: 10px; justify-items: start; }
.fx-pay-card { width: 100%; padding: 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.fx-pay-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 14px/1 var(--font); }
.fx-pay-h img { width: 22px; height: 22px; border-radius: 6px; }
.fx-pay-r { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font: 400 13px/1.2 var(--font); color: var(--ink-2); }
.fx-pay-r b { color: var(--ink); font-weight: 600; }
.fx-pay-btn { margin-top: 10px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 7px; font: 600 13px/1 var(--font); }
.fx-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; background: #fff; box-shadow: var(--shadow-card); font: 600 12.5px/1 var(--font); }

/* ---------- memory ---------- */
.fx-mem { width: 100%; max-width: 320px; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.fx-mem b { display: block; font: 600 14.5px/1.2 var(--font); }
.fx-mem small { display: block; font: 400 12px/1.3 var(--font); color: var(--muted); margin-top: 2px; }
.fx-mem-l { margin: 10px 0 2px; font: 600 11.5px/1 var(--font); color: var(--muted); }
.fx-mem-n { margin: 0; font: 400 13px/1.35 var(--font); color: var(--ink-2); }

/* memory: profile + agent greeting */
.fx-memw { width: 100%; max-width: 320px; display: grid; gap: 10px; }
.fx-mem-b { display: flex; gap: 8px; align-items: flex-end; }
.fx-mem-b img { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.fx-mem-b p { margin: 0; padding: 9px 12px; border-radius: 14px 14px 14px 5px; background: #fff; box-shadow: var(--shadow-card); font: 400 13.5px/1.4 var(--font); }

/* ---------- small: voice, language, handoff ---------- */
.fx-voice { display: flex; align-items: center; gap: 10px; }
.fx-voice small { margin-left: auto; }
.fx-mic { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.fx-mic .fx-ic { width: 16px; height: 16px; }
.fx-wave { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; max-width: 140px; }
.fx-wave i { width: 3px; border-radius: 2px; background: #B9A8F0; transform-origin: center; }
.fx.live:not(.static) .fx-wave i { animation: fx-wave 1.1s ease-in-out infinite; animation-delay: calc(var(--k) * -.09s); }
@keyframes fx-wave { 50% { transform: scaleY(.45); } }
.fx-voice small { font: 500 12.5px/1 var(--font); color: var(--muted); }
.fx-langs { display: flex; flex-wrap: wrap; gap: 5px; }
.fx-langs span { height: 26px; min-width: 34px; padding: 0 8px; border-radius: 99px; display: grid; place-items: center; background: var(--soft); font: 600 11.5px/1 var(--font); color: var(--ink-2); }
.fx-langs .on { background: var(--ink); color: #fff; }
.fx-hand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fx-hand-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12.5px/1 var(--font); }
.fx-hand-btn .fx-ic { width: 15px; height: 15px; }
.fx-hand-to { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--font); color: var(--ink-2); }

/* reveal for cards */
.fx-card { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.fx.play .fx-card { opacity: 1; transform: none; }
.fx.play .fx-card:nth-child(2) { transition-delay: .08s; }
.fx.play .fx-card:nth-child(3) { transition-delay: .16s; }
.fx.play .fx-card:nth-child(n+4) { transition-delay: .24s; }
.fx.static .fx-card { transition: none; }

/* ---------- 1 Bento rows ---------- */
.fx--rows .c-a2a { grid-column: span 12; flex-direction: row-reverse; }
.fx--rows .c-a2a .fx-vis { flex: 0 0 72%; min-height: 330px; }
.fx--rows .c-a2a .fx-txt { flex: 1; align-self: center; padding: 26px 26px 26px 18px; }
.fx--rows .c-a2a .fx-txt h3 { font-size: 27px; letter-spacing: -0.03em; }
.fx--rows .c-a2a .fx-txt p { font-size: 16px; margin-top: 10px; }
.fx--rows .c-kb { grid-column: span 7; }
.fx--rows .c-meet { grid-column: span 5; }
.fx--rows .c-pay { grid-column: span 4; }
.fx--rows .c-mem { grid-column: span 4; }
.fx--rows .fx-stack { grid-column: span 4; display: grid; gap: 18px; }
.fx--rows .fx-stack .fx-mini { opacity: 1; transform: none; }
.fx--rows .fx-stack { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease) .24s, transform .6s var(--ease) .24s; }
.fx--rows.play .fx-stack { opacity: 1; transform: none; }
.fx--rows.static .fx-stack { transition: none; }

/* ---------- 2 Bento columns ---------- */
.fx--cols .fx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "a a k" "m p mem" "v l h"; }
.fx--cols .c-a2a { grid-area: a; }
.fx--cols .c-a2a .fx-vis { min-height: 320px; padding: 22px; }
.fx--cols .c-a2a .fx-txt h3 { font-size: 24px; letter-spacing: -0.03em; }
.fx--cols .c-kb { grid-area: k; }
.fx--cols .c-kb .fx-vis { align-items: center; }
.fx--cols .c-meet { grid-area: m; }
.fx--cols .c-pay { grid-area: p; }
.fx--cols .c-mem { grid-area: mem; }
.fx--cols .c-voice { grid-area: v; }
.fx--cols .c-lang { grid-area: l; }
.fx--cols .c-hand { grid-area: h; }
.fx--cols .fx-a2a { grid-template-columns: minmax(0, 1fr) 22px minmax(0, .95fr) 22px minmax(0, 1.1fr); gap: 6px; }
.fx--cols .fx-page { height: 230px; }

@media (max-width: 1180px) {
  .fx--rows .c-a2a { flex-direction: column; }
  .fx--rows .c-a2a .fx-vis { flex: none; }
  .fx--rows .c-a2a .fx-txt { padding: 18px 14px 12px; }
  .fx--cols .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a a" "k m" "p mem" "v l" "h h"; }
}
@media (max-width: 900px) {
  .fx-a2a, .fx--cols .fx-a2a { grid-template-columns: 1fr; gap: 10px; }
  .fx-arrow { transform: rotate(90deg); height: 18px; }
  .fx-page { height: 170px; }
  .fx-json { min-height: 0; }
  .fx--rows .c-kb, .fx--rows .c-meet { grid-column: span 12; }
  .fx--rows .c-pay, .fx--rows .c-mem { grid-column: span 6; }
  .fx--rows .fx-stack { grid-column: span 12; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .fx-grid { margin-top: 36px; gap: 12px; }
  .fx-vis { padding: 16px; min-height: 0; }
  .fx--rows .c-a2a .fx-vis, .fx--cols .c-a2a .fx-vis { min-height: 0; padding: 14px; }
  .fx--rows .c-a2a .fx-txt h3, .fx--cols .c-a2a .fx-txt h3 { font-size: 22px; }
  .fx--rows .c-pay, .fx--rows .c-mem { grid-column: span 12; }
  .fx--rows .fx-stack { grid-template-columns: 1fr; gap: 12px; }
  .fx--cols .fx-grid { grid-template-columns: 1fr; grid-template-areas: "a" "k" "m" "p" "mem" "v" "l" "h"; }
  .fx-json { font-size: 12px; }
}
