/* =========================================================
   i4 AI Chatbot — Landing page
   Builds on ../css/style.css (tokens, nav, buttons, forms, cursor)
   and ../css/lp.css (hero shell, sections, ROI, plans, FAQ, apply form)
   ========================================================= */

.cb {
  --bot: rgba(255, 255, 255, .07);
  --user: linear-gradient(135deg, #3b8bff, #1d56d8);
  --desk: #8b7bff;
  --line-green: #7dd66a;
}
.c-small { font-size: 12px !important; color: var(--muted); margin-top: 10px; line-height: 1.8 !important; }
/* the floating chat button owns the bottom-right corner on this page */
.cb .indicator { right: auto; left: var(--gutter); }

/* ---------- Hero demo ---------- */
.c-hero .o-hero__grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.c-demo {
  border: 1px solid rgba(150, 185, 255, .18); border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
  padding: 14px;
}
.c-demo__tabs { display: flex; gap: 6px; padding: 2px 2px 12px; align-items: center; flex-wrap: wrap; }
.c-demo__tabs button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: rgba(214, 226, 255, .7); border: 1px solid transparent; transition: background-color .3s, color .3s, border-color .3s; }
.c-demo__tabs button:hover { color: #fff; border-color: rgba(150, 185, 255, .25); }
.c-demo__tabs button.is-active { background: rgba(94, 240, 255, .12); color: #fff; border-color: rgba(94, 240, 255, .4); }
.c-demo__replay { margin-left: auto; width: 34px; padding: 0 !important; display: grid; place-items: center; }
.c-demo__replay svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-demo__body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: 12px; }
.c-demo__note { font-size: 11.5px; color: rgba(214, 226, 255, .45); margin: 10px 4px 0; line-height: 1.7; }

/* ---------- Chat window (hero demo + floating panel) ---------- */
.c-chat {
  --log-h: 360px;
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border-radius: 18px; background: #0b1630; border: 1px solid rgba(150, 185, 255, .14);
  color: #eef3ff; font-size: 14px;
  transition: background-color .5s;
}
.c-chat__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(150, 185, 255, .12); background: rgba(255, 255, 255, .03); transition: background-color .5s, border-color .5s; }
.c-chat__avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, #f5a65b, #e0703a); transition: background .5s; }
.c-chat__avatar--i4 { background: #0e1d40; border: 1px solid rgba(143, 211, 255, .4); }
.c-chat__avatar--i4 svg { width: 22px; height: 17px; }
.c-chat__who { display: grid; min-width: 0; line-height: 1.35; }
.c-chat__who b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-chat__who small { font-size: 11px; color: rgba(214, 226, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-chat__live { margin-left: auto; font-size: 9.5px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.c-chat__live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.c-chat__log { flex: none; height: var(--log-h); overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: rgba(150, 185, 255, .25) transparent; overscroll-behavior: contain; }
.c-msg { display: flex; flex-direction: column; max-width: 88%; animation: c-msgIn .4s var(--ease-out) both; }
@keyframes c-msgIn { from { opacity: 0; transform: translateY(8px); } }
.c-msg--u { align-self: flex-end; align-items: flex-end; }
.c-msg--b { align-self: flex-start; }
.c-bub { padding: 9px 13px; border-radius: 16px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.c-msg--u .c-bub { background: var(--user); color: #fff; border-bottom-right-radius: 5px; }
.c-msg--b .c-bub { background: var(--bot); border: 1px solid rgba(150, 185, 255, .14); border-bottom-left-radius: 5px; }
.c-msg--b.is-fallback .c-bub { border-color: rgba(255, 154, 60, .45); }
.c-msg--b.is-guard .c-bub { border-color: rgba(167, 139, 250, .5); }
.c-msg--note { align-self: center; max-width: 100%; }
.c-msg--note .c-bub { background: none; padding: 2px 8px; font-size: 11px; color: rgba(214, 226, 255, .45); }
.c-caret::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: c-caret 1s steps(2) infinite; }
@keyframes c-caret { 50% { opacity: 0; } }
.c-srcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.c-src { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11px; line-height: 1.4; color: var(--scan); background: rgba(94, 240, 255, .08); border: 1px solid rgba(94, 240, 255, .25); animation: c-msgIn .4s var(--ease-out) both; }
.c-src svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-src span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-act { margin-top: 8px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; color: #fff; background: var(--user); box-shadow: 0 8px 20px -10px rgba(47, 128, 255, .9); }
.c-typing { display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 16px; border-bottom-left-radius: 5px; background: var(--bot); border: 1px solid rgba(150, 185, 255, .14); }
.c-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(214, 226, 255, .7); animation: c-dot 1.1s ease-in-out infinite; }
.c-typing i:nth-child(2) { animation-delay: .15s; }
.c-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes c-dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.c-chat__suggest { display: flex; gap: 6px; padding: 6px 12px 8px; overflow-x: auto; scrollbar-width: none; min-height: 44px; }
.c-chat__suggest::-webkit-scrollbar { display: none; }
.c-chat__suggest button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; color: #dce8ff; border: 1px solid rgba(150, 185, 255, .3); background: rgba(255, 255, 255, .03); transition: border-color .3s, background-color .3s; animation: c-msgIn .4s var(--ease-out) both; }
.c-chat__suggest button:hover { border-color: var(--scan); background: rgba(94, 240, 255, .08); }
.c-chat__form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(150, 185, 255, .12); }
.c-chat__form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(150, 185, 255, .22); background: rgba(4, 9, 20, .5); color: #fff; font: inherit; font-size: 16px; outline: none; transition: border-color .3s; }
.c-chat__form input::placeholder { color: rgba(214, 226, 255, .4); font-size: 13px; }
.c-chat__form input:focus { border-color: var(--scan); }
.c-chat__form button { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--user); color: #fff; transition: transform .3s var(--ease-out), opacity .3s; }
.c-chat__form button:hover { transform: scale(1.06); }
.c-chat__form button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-chat.is-busy .c-chat__form button { opacity: .5; }

/* Scenes */
.c-chat[data-scene="desk"] .c-chat__avatar { background: linear-gradient(135deg, #a08bff, #6a54e8); }
.c-chat[data-scene="desk"] .c-chat__head { background: rgba(139, 123, 255, .1); }
.c-chat[data-scene="line"] { background: #93a9c9; color: #1c2433; border-color: rgba(255, 255, 255, .25); }
.c-chat[data-scene="line"] .c-chat__head { background: #2b3446; color: #fff; border-color: transparent; }
.c-chat[data-scene="line"] .c-chat__avatar { background: linear-gradient(135deg, #6fcf97, #2f9e6a); }
.c-chat[data-scene="line"] .c-msg--u .c-bub { background: var(--line-green); color: #142010; }
.c-chat[data-scene="line"] .c-msg--b .c-bub { background: #fff; border-color: transparent; color: #1c2433; }
.c-chat[data-scene="line"] .c-msg--b.is-fallback .c-bub, .c-chat[data-scene="line"] .c-msg--b.is-guard .c-bub { box-shadow: inset 0 0 0 1.5px rgba(196, 86, 15, .5); }
.c-chat[data-scene="line"] .c-msg--note .c-bub { color: rgba(28, 36, 51, .6); }
.c-chat[data-scene="line"] .c-typing { background: #fff; border-color: transparent; }
.c-chat[data-scene="line"] .c-typing i { background: #8a94a6; }
.c-chat[data-scene="line"] .c-src { color: #1d56d8; background: rgba(255, 255, 255, .75); border-color: transparent; }
.c-chat[data-scene="line"] .c-chat__suggest button { color: #1c2433; background: rgba(255, 255, 255, .7); border-color: transparent; }
.c-chat[data-scene="line"] .c-chat__form { background: #fff; border-color: transparent; }
.c-chat[data-scene="line"] .c-chat__form input { background: #f1f3f6; color: #1c2433; border-color: transparent; }
.c-chat[data-scene="line"] .c-chat__form input::placeholder { color: #8a94a6; }
.c-chat[data-scene="line"] .c-chat__form button { background: #2f9e6a; }
.c-chat[data-scene="line"] .c-chat__log { scrollbar-color: rgba(28, 36, 51, .25) transparent; }

/* ---------- Behind the answer ---------- */
.c-trace { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 14px; border-radius: 18px; background: rgba(4, 9, 20, .55); border: 1px solid rgba(150, 185, 255, .14); font-size: 12.5px; color: rgba(214, 226, 255, .85); }
.c-trace__head { font-size: 10px; color: rgba(214, 226, 255, .55); padding-bottom: 10px; border-bottom: 1px solid rgba(150, 185, 255, .12); }
.c-trace__step > .mono { display: block; font-size: 9.5px; color: var(--scan); margin-bottom: 6px; }
.c-trace__q { color: #fff; font-size: 13px; line-height: 1.6; min-height: 1.6em; word-break: break-word; }
.c-trace__hits { display: grid; gap: 8px; min-height: 118px; }
.c-hit { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 3px 10px; align-items: center; animation: c-msgIn .35s var(--ease-out) both; }
.c-hit__t { font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-hit__s { grid-row: span 2; font-family: var(--f-mono); font-size: 11.5px; text-align: right; color: var(--ok); }
.c-hit__bar { position: relative; height: 4px; border-radius: 4px; background: rgba(150, 185, 255, .14); overflow: hidden; }
.c-hit__bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--s, 0)); background: var(--ok); border-radius: inherit; animation: c-grow .6s var(--ease-out) both; }
@keyframes c-grow { from { transform: scaleX(0); } }
.c-hit__bar::after { content: ''; position: absolute; top: -2px; bottom: -2px; left: 30%; border-left: 1px dashed rgba(255, 154, 60, .8); }
.c-hit.is-out .c-hit__t { color: rgba(214, 226, 255, .45); }
.c-hit.is-out .c-hit__s { color: var(--warn); }
.c-hit.is-out .c-hit__bar i { background: rgba(255, 154, 60, .6); }
.c-trace__empty { color: rgba(214, 226, 255, .45); font-size: 12px; line-height: 1.7; }
.c-trace__th { font-size: 9.5px; color: rgba(255, 154, 60, .85); text-transform: none; letter-spacing: .04em; display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.c-trace__th i { width: 14px; border-top: 1px dashed currentColor; }
.c-trace__verdict { line-height: 1.7; min-height: 3.4em; }
.c-badge { display: inline-block; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; font-weight: 700; }
.c-badge.is-ok { background: rgba(52, 211, 153, .16); color: var(--ok); }
.c-badge.is-none { background: rgba(255, 154, 60, .16); color: var(--warn); }
.c-badge.is-guard { background: rgba(167, 139, 250, .18); color: #c4b5fd; }
.c-badge.is-talk { background: rgba(94, 240, 255, .12); color: var(--scan); }

/* ---------- Uses ---------- */
.c-uses__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.c-use { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 44px); border-radius: 28px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -45px rgba(10, 22, 48, .4); }
.c-use::before { content: ''; position: absolute; width: 360px; height: 360px; right: -140px; top: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(47, 128, 255, .16), transparent 65%); pointer-events: none; }
.c-use--inside::before { background: radial-gradient(circle, rgba(139, 123, 255, .18), transparent 65%); }
.c-use__kicker { color: var(--accent); }
.c-use--inside .c-use__kicker { color: #6a54e8; }
.c-use h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.4; margin: 12px 0 14px; }
.c-use__text { color: var(--muted); font-size: 15px; line-height: 2; max-width: 32em; }
.c-use__marquee { margin: 26px calc(-1 * clamp(26px, 3vw, 44px)) 6px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.c-use__marquee ul { display: flex; gap: 8px; width: max-content; animation: c-marquee 38s linear infinite; }
.c-use__marquee--rev ul { animation-direction: reverse; }
.c-use__marquee li { flex: none; padding: 8px 14px; border-radius: 16px 16px 16px 5px; font-size: 13px; background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--fg); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.c-use--inside .c-use__marquee li { background: rgba(139, 123, 255, .08); border-color: rgba(139, 123, 255, .25); }
@keyframes c-marquee { to { transform: translateX(-50%); } }
.c-use .o-check { flex: 1; }
.c-use__ch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.c-use__ch span { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) { .c-uses__grid { grid-template-columns: 1fr; } }

/* ---------- How it answers (knowledge map) ---------- */
.c-map { border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)); padding: clamp(18px, 2.6vw, 34px); }
.c-map__qs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.c-map__qs .mono { color: var(--muted); margin-right: 8px; }
.c-map__qs .chip { height: 38px; font-size: 13.5px; }
.c-map__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.c-map__viz { border-radius: 20px; background: radial-gradient(70% 70% at 50% 45%, rgba(37, 96, 210, .2), transparent 70%), #0a1430; border: 1px solid rgba(150, 185, 255, .12); overflow: hidden; }
.c-map__svg { display: block; width: 100%; height: auto; font-family: var(--f-sans); }
.c-map__cap { font-size: 9.5px; color: rgba(214, 226, 255, .45); padding: 0 16px 12px; text-transform: none; letter-spacing: .04em; }
.m-zone { fill: rgba(150, 185, 255, .035); stroke: rgba(150, 185, 255, .1); }
.m-zone-label { fill: rgba(214, 226, 255, .55); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.m-zone-label.is-in { fill: rgba(196, 181, 253, .75); }
.m-dot { fill: #6f8fc9; transition: fill .5s, opacity .5s, r .5s; }
.m-dot.is-in { fill: #9b8cff; }
.c-map.is-active .m-dot { opacity: .3; }
.c-map.is-active .m-dot.is-hit { opacity: 1; fill: #8ff3ff; }
.m-ring { fill: rgba(94, 240, 255, .05); stroke: rgba(94, 240, 255, .55); stroke-width: 1.2; stroke-dasharray: 4 5; transition: r .9s var(--ease-out), opacity .5s; }
.m-q { fill: #fff; filter: drop-shadow(0 0 10px rgba(94, 240, 255, .9)); transition: cx .9s var(--ease-out), cy .9s var(--ease-out), opacity .4s; }
.m-q-pulse { fill: none; stroke: #fff; stroke-width: 1.5; opacity: 0; }
.c-map.is-active .m-q-pulse { animation: c-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes c-pulse { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.m-link { stroke: #8ff3ff; stroke-width: 1.6; stroke-linecap: round; opacity: .9; }
.m-score { fill: #8ff3ff; font-family: var(--f-mono); font-size: 11px; paint-order: stroke; stroke: #0a1430; stroke-width: 4px; }
.m-label { fill: #fff; font-size: 11.5px; paint-order: stroke; stroke: #0a1430; stroke-width: 4px; }
.m-none { fill: var(--warn); font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: #0a1430; stroke-width: 5px; }
.m-legend { fill: rgba(214, 226, 255, .55); font-size: 11px; }
/* the map shrinks to about half size on phones, so its text is drawn larger to stay readable */
@media (max-width: 560px) {
  .m-zone-label { font-size: 22px; }
  .m-legend { font-size: 18px; }
  .m-score { font-size: 19px; stroke-width: 6px; }
  .m-label, .m-none { font-size: 21px; stroke-width: 7px; }
}

.c-map__steps { display: grid; gap: 4px; margin-bottom: 18px; }
.c-map__steps li { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; opacity: .4; transition: opacity .4s, background-color .4s, border-color .4s; }
.c-map__steps li .mono { grid-row: span 2; color: var(--scan); padding-top: 2px; }
.c-map__steps li b { font-size: 14.5px; font-weight: 700; }
.c-map__steps li small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.c-map__steps li.is-on { opacity: 1; background: rgba(94, 240, 255, .06); border-color: rgba(94, 240, 255, .22); }
.c-map__steps li.is-on.is-none { background: rgba(255, 154, 60, .07); border-color: rgba(255, 154, 60, .3); }
.c-map__steps li.is-on.is-none .mono { color: var(--warn); }
.c-map__answer { min-height: 160px; padding: 16px 18px; border-radius: 18px; background: rgba(4, 9, 20, .5); border: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease-out), border-color .5s; }
.c-map__answer.is-on { opacity: 1; transform: none; }
.c-map__answer.is-none { border-color: rgba(255, 154, 60, .4); }
.c-map__a-q { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.c-map__a-text { font-size: 14px; line-height: 1.9; color: var(--fg); }
.c-map__a-src { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
@media (max-width: 1020px) { .c-map__grid { grid-template-columns: 1fr; } .c-map__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .c-map__steps { grid-template-columns: 1fr; } .c-map__qs .mono { width: 100%; } }

/* ---------- Trust ---------- */
.c-guards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.c-guard { padding: 28px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -45px rgba(10, 22, 48, .4); }
.c-guard h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 21px; margin: 22px 0 10px; }
.c-guard > p { color: var(--muted); font-size: 14.5px; line-height: 1.95; }
.c-guard__viz { position: relative; min-height: 168px; border-radius: 16px; background: #eef3fb; border: 1px solid rgba(10, 22, 48, .06); padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 8px; color: #0a1630; }
.c-mini { max-width: 86%; padding: 8px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.7; }
.c-mini--u { align-self: flex-end; background: var(--user); color: #fff; border-bottom-right-radius: 4px; }
.c-mini--b { align-self: flex-start; background: #fff; border: 1px solid rgba(10, 22, 48, .08); border-bottom-left-radius: 4px; box-shadow: 0 6px 18px -12px rgba(10, 22, 48, .4); }
.c-guard__tag { position: absolute; right: 14px; bottom: 10px; font-size: 9.5px !important; color: #0f8a68; text-transform: none; letter-spacing: .04em; }
.c-web { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-top: 16px; padding: 26px 28px; border-radius: 24px; border: 1px dashed var(--line); }
.c-web__ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.c-web__ic svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.c-web h3 { font-family: var(--f-serif-jp); font-weight: 700; font-size: 19px; margin-bottom: 8px; }
.c-web p { color: var(--muted); font-size: 14.5px; line-height: 1.95; max-width: 60em; }
@media (max-width: 860px) { .c-guards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .c-web { grid-template-columns: 1fr; } }

/* ---------- Update (spreadsheet demo) ---------- */
.c-sync { display: grid; grid-template-columns: minmax(0, 1.45fr) 150px minmax(0, .85fr); gap: 20px; align-items: center; }
.c-sheet { border-radius: 16px; overflow: hidden; background: #fff; color: #1f2937; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); font-size: 13px; }
.c-sheet__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.c-sheet__icon { width: 18px; height: 22px; border-radius: 3px; background: #1e9e5a; position: relative; }
.c-sheet__icon::after { content: ''; position: absolute; inset: 6px 4px 4px; background: linear-gradient(#fff, #fff) 0 0 / 100% 1.5px no-repeat, linear-gradient(#fff, #fff) 0 50% / 100% 1.5px no-repeat, linear-gradient(#fff, #fff) 0 100% / 100% 1.5px no-repeat, linear-gradient(#fff, #fff) 50% 0 / 1.5px 100% no-repeat; }
.c-sheet__bar b { font-size: 14px; }
.c-sheet__share { margin-left: auto; font-size: 9.5px; color: #6b7280; text-transform: none; letter-spacing: .04em; }
.c-sheet__scroll { overflow-x: auto; }
.c-sheet__grid { width: 100%; min-width: 520px; border-collapse: collapse; table-layout: fixed; }
.c-sheet__grid th, .c-sheet__grid td { border: 1px solid #e5e7eb; padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.c-sheet__grid th { background: #f3f4f6; color: #6b7280; font-weight: 500; font-size: 11px; text-align: center; }
.c-sheet__c0 { width: 34px; }
.c-sheet__c1 { width: 76px; }
.c-sheet__c2 { width: 31%; }
.c-sheet__cols th { height: 22px; padding: 2px; }
.c-sheet__hdr td { background: #f9fafb; font-weight: 700; font-size: 12px; color: #374151; }
.c-sheet__edit td { background: #fffbea; transition: background-color .5s; }
.c-sheet__edit.is-dirty td { background: #fff3c4; }
.c-sheet__edit.is-synced td { background: #e7f8ef; }
.c-sheet__cell { display: block; position: relative; }
.c-sheet__cell textarea { display: block; width: 100%; min-height: 76px; resize: none; border: 2px solid #1a73e8; border-radius: 2px; padding: 6px 8px; font: inherit; font-size: 13px; line-height: 1.6; color: #111827; background: #fff; outline: none; }
.c-sheet__hint { position: absolute; right: 0; top: -26px; font-size: 9.5px; color: #fff; background: #1a73e8; padding: 3px 8px; border-radius: 4px; white-space: nowrap; text-transform: none; letter-spacing: .04em; pointer-events: none; transition: opacity .4s; }
.c-sheet__hint::after { content: ''; position: absolute; right: 14px; bottom: -4px; border: 4px solid transparent; border-bottom: 0; border-top-color: #1a73e8; }
.c-sync.is-touched .c-sheet__hint { opacity: 0; }
.c-sync__mid { display: grid; justify-items: center; gap: 12px; text-align: center; }
.c-sync__mid .btn { width: 100%; justify-content: center; padding: 0 12px; }
.c-sync__pipe { position: relative; width: 100%; height: 6px; border-radius: 6px; background: rgba(150, 185, 255, .15); overflow: hidden; }
.c-sync__pipe i { position: absolute; inset: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--scan), transparent); transform: translateX(-110%); }
.c-sync.is-syncing .c-sync__pipe i { animation: c-pipe .9s linear infinite; }
@keyframes c-pipe { to { transform: translateX(260%); } }
.c-sync__status { font-size: 10px; color: var(--muted); text-transform: none; letter-spacing: .04em; line-height: 1.6; min-height: 3.2em; }
.c-sync__status.is-dirty { color: var(--warn); }
.c-sync__status.is-ok { color: var(--ok); }
.c-sync__auto { font-size: 9.5px; color: var(--scan); border: 1px solid rgba(94, 240, 255, .3); border-radius: 999px; padding: 4px 10px; text-transform: none; letter-spacing: .06em; }
.c-phone { border-radius: 30px; padding: 10px; background: #111a2e; border: 1px solid rgba(150, 185, 255, .2); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8); }
.c-phone__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; font-size: 13px; }
.c-phone__head .c-chat__avatar { width: 28px; height: 28px; font-size: 13px; }
.c-phone__log { height: 270px; border-radius: 22px; background: #0b1630; padding: 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; color: #eef3ff; }
.c-update__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
/* phones: drop the category column so the question and the editable answer have room */
@media (max-width: 560px) {
  .c-sheet__grid { min-width: 0; table-layout: auto; font-size: 12px; }
  .c-sheet__grid tr > :nth-child(2) { display: none; }
  .c-sheet__c0, .c-sheet__c1, .c-sheet__c2 { width: auto; }
  .c-sheet__grid tr > td:nth-child(3) { width: 38%; }
  .c-sheet__grid th, .c-sheet__grid td { padding: 7px 8px; }
  .c-sheet__cell textarea { min-height: 96px; font-size: 16px; }
  .c-sheet__share { display: none; }
}
@media (max-width: 1100px) {
  .c-sync { grid-template-columns: 1fr; }
  .c-sync__mid { grid-template-columns: auto 1fr; grid-template-areas: 'btn status' 'pipe pipe' 'auto auto'; text-align: left; justify-items: start; max-width: 560px; width: 100%; margin: 0 auto; }
  .c-sync__mid .btn { grid-area: btn; width: auto; }
  .c-sync__pipe { grid-area: pipe; }
  .c-sync__status { grid-area: status; min-height: 0; align-self: center; }
  .c-sync__auto { grid-area: auto; }
  .c-phone { max-width: 400px; width: 100%; margin: 0 auto; }
}
@media (max-width: 860px) { .c-update__cards { grid-template-columns: 1fr; } }

/* ---------- Channels hub ---------- */
.c-hub { position: relative; border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(60% 70% at 50% 50%, rgba(37, 96, 210, .18), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)); padding: clamp(14px, 2.4vw, 30px); }
.c-hub__svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-sans); }
.c-hub__zone { fill: rgba(214, 226, 255, .5); font-size: 13px; letter-spacing: .1em; }
.c-hub__core circle { fill: url(#g-core); stroke: #8fd3ff; stroke-width: 1.5; }
.c-hub__core .c-hub__halo { fill: rgba(47, 128, 255, .12); stroke: rgba(143, 211, 255, .25); stroke-dasharray: 3 6; animation: c-spin 30s linear infinite; transform-origin: 380px 230px; }
@keyframes c-spin { to { transform: rotate(360deg); } }
.c-hub__core text { fill: #fff; text-anchor: middle; }
.c-hub__core .t-big { font-family: var(--f-serif-en); font-style: italic; font-size: 34px; font-weight: 600; }
.c-hub__core .t-mid { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; }
.c-hub__core .t-sub { font-size: 11px; fill: rgba(214, 226, 255, .75); }
.h-edge { stroke: rgba(143, 211, 255, .28); stroke-width: 1.5; fill: none; }
.h-edge.is-dev { stroke-dasharray: 5 6; }
.h-node rect { fill: #0e1d40; stroke: rgba(143, 211, 255, .45); stroke-width: 1.3; }
.h-node.is-std rect { stroke: #5aa8ff; fill: #12306b; }
.h-node text { fill: #e8f0ff; font-size: 14px; font-weight: 700; }
.h-node .h-tag { font-size: 10.5px; font-weight: 500; fill: rgba(214, 226, 255, .6); }
.h-node.is-std .h-tag { fill: var(--scan); }
.h-node .h-ic { fill: none; stroke: #8fd3ff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.h-pkt { fill: #bff6ff; filter: drop-shadow(0 0 5px #5ef0ff); }
.h-pkt.is-out { fill: #fff; filter: drop-shadow(0 0 5px #8fb6ff); }
.c-hub__legend { position: absolute; left: clamp(14px, 2.4vw, 30px); bottom: clamp(12px, 2vw, 24px); display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.c-hub__legend li { display: flex; align-items: center; gap: 8px; }
.c-hub__legend i { width: 22px; height: 0; border-top: 2px solid #5aa8ff; }
.c-hub__legend i.is-dev { border-top: 2px dashed rgba(143, 211, 255, .55); }
.c-ch__cards { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 28px; }
.c-code { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: rgba(4, 9, 20, .65); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.8; color: #dbe7ff; white-space: pre; overflow-x: auto; text-transform: none; letter-spacing: 0; }
.c-code .t { color: #8fd3ff; }
.c-code .a { color: #c4b5fd; }
.c-code .s { color: #7ee2b8; }
/* minmax(0, …) so the unwrapped code sample scrolls inside its card instead of widening the page */
@media (max-width: 1080px) { .c-ch__cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .c-hub__legend { position: static; margin-top: 12px; } }
.c-hub__list { display: none; }
@media (max-width: 560px) {
  .c-hub__legend { display: none; }
  .c-hub__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .c-hub__list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(143, 211, 255, .35); background: rgba(14, 29, 64, .6); }
  .c-hub__list li.is-std { border: 1px solid #5aa8ff; background: #12306b; }
  .c-hub__list b { font-size: 13px; }
  .c-hub__list small { font-size: 11px; color: var(--muted); }
  .c-hub__list li.is-std small { color: var(--scan); }
}

/* ---------- Use cases ---------- */
.c-cases__label { color: var(--accent); margin: 0 0 14px; }
.o-case-list + .c-cases__label { margin-top: 34px; }

/* ---------- Floating chat (demo) ---------- */
.c-launch { position: fixed; z-index: 70; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: 999px; color: #fff; background: var(--user); box-shadow: 0 16px 40px -12px rgba(31, 95, 224, .9), 0 0 0 1px rgba(255, 255, 255, .12) inset; transform: translateY(140%); transition: transform .5s var(--ease-out), opacity .3s; }
.c-launch.is-on { transform: none; }
.c-launch svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.c-launch span { display: grid; text-align: left; font-size: 14px; font-weight: 700; line-height: 1.2; }
.c-launch small { font-family: var(--f-mono); font-size: 9px; font-weight: 400; letter-spacing: .16em; opacity: .75; }
.c-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }
.c-panel { position: fixed; z-index: 71; right: 20px; bottom: 20px; width: min(390px, calc(100vw - 40px)); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55)); transform-origin: 100% 100%; animation: c-panelIn .45s var(--ease-out); }
.c-panel[hidden] { display: none; }
@keyframes c-panelIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.c-chat--panel { --log-h: min(380px, calc(100svh - 300px)); border-color: rgba(143, 211, 255, .3); }
.c-panel__close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: rgba(214, 226, 255, .8); transition: background-color .3s; }
.c-panel__close:hover { background: rgba(255, 255, 255, .08); }
.c-panel__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 560px) {
  .c-launch { right: 14px; bottom: 14px; height: 52px; padding: 0 16px 0 14px; }
  .c-panel { right: 8px; left: 8px; bottom: 8px; width: auto; }
}

/* ---------- Hero responsive ---------- */
@media (max-width: 1180px) { .c-hero .o-hero__grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .c-demo { padding: 10px; border-radius: 20px; }
  .c-demo__body { grid-template-columns: 1fr; }
  .c-demo__tabs button { padding: 0 11px; font-size: 12px; }
  .c-chat { --log-h: 320px; }
  .c-trace__hits { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .c-use__marquee ul { animation: none; flex-wrap: wrap; width: auto; padding: 0 clamp(26px, 3vw, 44px); }
}
