/* home.css (the new look, 2026-10-30): the home page's own layout, from the approved design
   (design/new-ui/source/site/03-landing-page/src: hero-built.html and sections.css). Loaded after site.css and
   common.css. The hero (the two big headlines in Outfit 600, the email box with its glow, the moving logos), the
   product window, the steps, the bento of what bidi does, the control panel, the custom work band and the last
   call. Everything drawn here is an illustration: no number on it is anyone's.

   Motion moves things by transform and opacity, rests off screen ([data-rest-offscreen], site.js) and once the
   page has been left alone ([data-rest-idle]), and stops under reduced motion. */

/* ---- hero ------------------------------------------------------------------------------------------------------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: 96px 0; }
.hero h1 { margin: 0; max-width: 1016px; font: 600 88px/1.12 var(--headline); letter-spacing: -0.01em; color: var(--head-mid); }
/* Each line carries its own gradient: bright across the middle, easing to grey at both ends. */
.hero h1 .l {
  display: block; width: fit-content; margin-inline: auto;
  background: linear-gradient(90deg, var(--head-edge) 0%, var(--head-mid) 30%, var(--head-mid) 70%, var(--head-edge) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.06em;
}
.hero .sub { margin: 24px 0 0; max-width: 600px; color: var(--text-2); font: 400 18px/28px var(--body); text-wrap: balance; }

/* ---- the email box ----------------------------------------------------------------------------------------------- */
.capture { margin-top: 40px; width: 100%; max-width: 560px; }
.field {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 64px; padding: 8px 8px 8px 24px; border-radius: var(--pill-radius);
  background: var(--field); outline: 1px solid var(--field-line); outline-offset: -1px; isolation: isolate;
}
/* The glow along the top edge: a bright hairline plus a soft bloom above it. */
.field::before {
  content: ""; position: absolute; z-index: -1; left: 10%; right: 10%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--glow) 25%, var(--glow-hi) 50%, var(--glow) 75%, transparent);
}
.field::after {
  content: ""; position: absolute; z-index: -2; left: 20%; right: 20%; top: -20px; height: 40px;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-core), var(--glow-mid) 45%, transparent 72%);
  filter: blur(10px); pointer-events: none;
}
.field:focus-within { outline-color: var(--line-2); }
.field input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 16px/24px var(--body); }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 48px var(--field) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); }
.field input::placeholder { color: var(--text-3); opacity: 1; }
.field:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.field .btn { height: 48px; padding: 0 24px; font-size: 16px; line-height: 24px; flex: none; }
.form-note { min-height: 20px; margin: 12px 0 0; font: 400 14px/20px var(--body); color: var(--text-2); }
.form-note.err { color: var(--error); }

/* ---- the logos that move --------------------------------------------------------------------------------------- */
.strip { margin-top: 96px; padding-bottom: 96px; width: 100%; }
.strip-head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; }
.strip-cap { margin: 0; color: var(--text-3); font: 500 14px/20px var(--body); }
.mq-toggle { width: 24px; height: 24px; border: 0; }
.mq-toggle svg { width: 12px; height: 12px; }
.mq-toggle .play { display: none; }
.mq-toggle[aria-pressed="true"] .play { display: block; }
.mq-toggle[aria-pressed="true"] .pause { display: none; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.track { display: flex; width: max-content; animation: slide 48s linear infinite; }
.marquee:hover .track, .marquee.paused .track, .strip:focus-within .track { animation-play-state: paused; }
/* Paused by the visitor (the button by the logos, home.js): every picture on the page holds where it is. */
:root[data-motion-paused] main *, :root[data-motion-paused] main *::before, :root[data-motion-paused] main *::after {
  animation-play-state: paused !important;
}
.set { display: flex; align-items: center; gap: 48px; padding-right: 48px; margin: 0; list-style: none; padding-left: 0; }
.set li {
  display: inline-flex; align-items: center; gap: 8px; height: 40px;
  color: var(--logo); white-space: nowrap; transition: color .2s;
  font: 600 18px/24px var(--display); letter-spacing: -0.02em;
}
.set li:hover { color: var(--logo-hover); }
.set svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- the chat drawn in the bento (the real chat is the widget in the corner) ------------------------------------- */
.m-you { align-self: flex-end; max-width: 80%; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--bubble); white-space: pre-wrap; animation: pop .25s ease both; }
[dir="rtl"] .m-you { align-self: flex-start; }
.m-bot { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; animation: pop .25s ease both; }
.m-bot .txt { padding-top: 2px; min-width: 0; }
.m-bot .txt p { margin: 0; }
.thinking-line { display: flex; align-items: center; gap: 12px; height: 28px; font: 500 14px/20px var(--body); }
.shimmer { color: var(--text-2); animation: think 1.6s ease-in-out infinite; }
@keyframes think { 50% { opacity: .45; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Product window ---------- */
.showcase { position: relative; padding-top: 32px; }
.show-tabs { display: flex; justify-content: center; margin-bottom: 32px; }
.app {
  position: relative; border-radius: 20px; overflow: hidden;
  background: var(--mock); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.show-glow {
  position: absolute; left: 15%; right: 15%; top: 40px; height: 160px; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-mid), transparent 70%); filter: blur(40px);
}
.app::before {
  content: ""; position: absolute; left: 20%; right: 20%; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--glow) 30%, var(--glow-hi) 50%, var(--glow) 70%, transparent);
}
.app-top { height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.app-top .mk { width: 20px; height: 18px; color: var(--text); }
.app-top .slash { color: var(--line-2); font: 400 16px/1 var(--body); }
.bot-chip { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/20px var(--display); letter-spacing: -0.02em; }
.bot-chip b { width: 20px; height: 20px; border-radius: 6px; background: var(--glow); color: #fff; display: inline-grid; place-items: center; font: 600 11px/1 var(--body); }
.app-top .grow { flex: 1; }
.ask { height: 28px; padding: 0 12px; border-radius: 999px; background: var(--pill); color: var(--pill-ink); display: inline-flex; align-items: center; gap: 6px; font: 600 12px/16px var(--body); }
.ask svg { width: 12px; height: 12px; }
.app-body { display: grid; grid-template-columns: 200px 1fr; min-height: 520px; }
.app-side { border-right: 1px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.app-side button {
  height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); font: 500 14px/20px var(--body); text-align: left; cursor: pointer;
  transition: color .2s, background-color .2s;
}
.app-side button svg { width: 16px; height: 16px; flex: none; }
.app-side button:hover { color: var(--text); background: var(--line); }
.app-side button[aria-selected="true"] { color: var(--text); background: var(--raised); }
.app-side .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 11px/20px var(--body); text-align: center; }
.app-side .static { pointer-events: none; color: var(--text-3); }
.app-main { padding: 24px; min-width: 0; }
.view { display: none; animation: fadein .35s ease; }
.view.on { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.v-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.v-head h3 { margin: 0; font: 600 24px/32px var(--display); letter-spacing: -0.03em; }
.v-head p { margin: 0; font: 400 13px/20px var(--body); color: var(--text-3); }

/* Overview */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 16px; position: relative; }
.stat .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .k { font: 500 13px/20px var(--body); color: var(--text-2); }
.stat .ic { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-2); }
.stat .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stat .v { margin-top: 8px; font: 600 28px/32px var(--display); letter-spacing: -0.03em; }
.stat .v small { font-size: 14px; color: var(--text-3); letter-spacing: 0; }
.stat .s { margin-top: 8px; display: flex; align-items: center; gap: 4px; font: 500 12px/16px var(--body); color: var(--text-3); }
.stat .s svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat .s.up { color: var(--ok); } .stat .s.flat { color: var(--flat); } .stat .s.down { color: var(--hot); }
/* Trend: a big arrow behind the card in the trend colour, the change as a number, the card tinted at its edge (orb card style) */
.stat.st-up { --tc: var(--ok); } .stat.st-flat { --tc: var(--flat); } .stat.st-down { --tc: var(--hot); }
.stat.st-up, .stat.st-flat, .stat.st-down { overflow: hidden; isolation: isolate; border-color: color-mix(in srgb, var(--tc) 30%, var(--line));
  background: linear-gradient(150deg, var(--panel) 40%, color-mix(in srgb, var(--tc) 13%, var(--panel))); }
.stat .bg-arr { position: absolute; right: -14px; bottom: -20px; z-index: -1; width: 104px; height: 104px; fill: none; stroke: var(--tc); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .3;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--tc) 55%, transparent)); }
.stat .s b { font: 600 14px/16px var(--display); color: var(--tc); }
.stat.st-up .s span, .stat.st-flat .s span, .stat.st-down .s span { color: var(--text-2); }
.stat.hot { border-color: color-mix(in srgb, var(--hot) 45%, var(--line)); background: linear-gradient(180deg, var(--hot-soft), transparent 70%), var(--panel); }
.stat.hot .ic { color: var(--hot); position: relative; }
.stat.hot .ic::after { content: ""; position: absolute; top: -4px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 2px var(--panel); }
.stat.hot .ic::before { content: ""; position: absolute; top: -4px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); animation: hotping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes hotping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.stat.hot .v { color: var(--hot); }
.stat.hot .s { color: var(--text-2); }
.ov-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; margin-top: 12px; }
.chart { padding: 16px 16px 12px; }
.chart h4, .langs h4, .mc h4 { margin: 0 0 16px; font: 600 14px/20px var(--display); letter-spacing: -0.01em; }
.lc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lc-head h4 { margin: 0 !important; }
.lc-legend { display: flex; gap: 12px; font: 500 11px/20px var(--body); color: var(--text-2); }
.lc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lc-legend i { width: 8px; height: 8px; border-radius: 50%; }
.lc-legend .k1 { background: var(--accent); } .lc-legend .k2 { background: var(--ok); opacity: .7; }
.lchart { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; }
.ly { height: 160px; display: flex; flex-direction: column; justify-content: space-between; font: 400 11px/1 var(--body); color: var(--text-3); text-align: right; margin: -5px 0; padding: 0; }
.ly span:last-child { transform: translateY(0); }
.lplot { position: relative; height: 160px; border-bottom: 1px solid var(--line); cursor: crosshair; }
.lplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lgrid path { stroke: var(--line); stroke-dasharray: 4 4; fill: none; vector-effect: non-scaling-stroke; }
.l1, .l2 { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.l1 { stroke: var(--accent); stroke-width: 2.5; }
.l2 { stroke: var(--ok); stroke-width: 2; opacity: .55; }
.lfill { fill: url(#l-grad); opacity: 0; transition: opacity .8s .6s; }
.lplot .l1, .lplot .l2 { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.3,.7,.2,1); }
.lplot .l2 { transition-delay: .2s; }
.in .lplot .l1, .in .lplot .l2 { stroke-dashoffset: 0; }
.in .lfill { opacity: 1; }
/* The marker: a layer the size of the plot, moved by transform (a percentage of its own size is one of the
   plot's), carrying the dashed line, the dot and the value. */
.lmark { position: absolute; inset: 0; pointer-events: none; transform: translate(var(--mx, 50%), 0); opacity: 0; transition: opacity .3s 1.2s, transform .5s cubic-bezier(.3,.7,.2,1); }
.lmark-y { position: absolute; left: 0; top: 0; width: 0; height: 100%; transform: translateY(var(--my, 50%)); transition: transform .5s cubic-bezier(.3,.7,.2,1); }
.lvline { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-left: 1.5px dashed var(--line-2); transform: translateX(-.75px); }
.ldot { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--panel), 0 0 0 7px var(--accent-soft); }
.ltip { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 14px)); padding: 4px 8px; border-radius: 8px; background: var(--accent); color: var(--ground); font: 600 12px/16px var(--body); white-space: nowrap; }
.ltip.edge-l { transform: translate(-36px, calc(-100% - 14px)); } .ltip.edge-r { transform: translate(calc(-100% + 36px), calc(-100% - 14px)); }
.ltip::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.ltip.edge-l::after { left: 36px; } .ltip.edge-r::after { left: auto; right: 32px; }
.ltip small { font-weight: 400; opacity: .8; margin-left: 4px; font-size: 11px; }
.in .lmark { opacity: 1; }
.lplot.moving .lmark, .lplot.moving .lmark-y { transition: none; }
.lx { padding-left: 24px; }
.bars-x { display: flex; justify-content: space-between; margin-top: 8px; font: 400 11px/16px var(--body); color: var(--text-3); }
.langs { padding: 16px; }
.lang { display: grid; grid-template-columns: 64px 1fr 24px; align-items: center; gap: 12px; height: 32px; font: 500 13px/20px var(--body); }
.lang .num { text-align: right; color: var(--text-3); }

/* Helpdesk */
.hd { display: grid; grid-template-columns: 240px 1fr; min-height: 420px; overflow: hidden; }
.hd-list { border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.tk { padding: 10px 12px; border-radius: 8px; }
.tk.sel { background: var(--raised); }
.tk .r1 { display: flex; justify-content: space-between; gap: 8px; font: 600 13px/20px var(--body); }
.tk .r1 span { font-weight: 400; color: var(--text-3); font-size: 12px; }
.tk .r2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; font: 400 12px/16px var(--body); color: var(--text-2); }
.tk .r2 em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-thread { display: flex; flex-direction: column; min-width: 0; }
.th-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.th-head b { font: 600 15px/20px var(--display); letter-spacing: -0.01em; }
.th-head .chips { display: flex; gap: 6px; margin-top: 4px; }
.chip { height: 20px; padding: 0 8px; border-radius: 6px; background: var(--raised); color: var(--text-2); font: 500 11px/20px var(--body); white-space: nowrap; }
.th-act { display: flex; gap: 8px; align-items: center; }
.ghost-btn { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; font: 500 12px/16px var(--body); color: var(--text); white-space: nowrap; }
.th-msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 76%; padding: 8px 12px; border-radius: 12px; font: 400 13px/20px var(--body); }
.msg.in { background: var(--bubble); align-self: flex-start; }
.msg.out { align-self: flex-end; border: 1px solid var(--line-2); }
.msg-meta { font: 400 11px/16px var(--body); color: var(--text-3); }
.msg-meta.r { align-self: flex-end; }
.evt { align-self: center; font: 400 12px/16px var(--body); color: var(--text-3); margin: 4px 0; }
.composer { margin: 0 16px 16px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; }
.composer .draft { min-height: 40px; font: 400 13px/20px var(--body); color: var(--text); }
.composer .draft:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.composer .row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.composer .row .grow { flex: 1; }
.mini-btn {
  height: 28px; padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/16px var(--body); background: transparent; color: var(--text-2);
}
.mini-btn:hover { color: var(--text); background: var(--line); }
.mini-btn.pri { background: var(--pill); color: var(--pill-ink); }
.mini-btn svg { width: 12px; height: 12px; }

/* Leads table */
.tbl { width: 100%; border-collapse: collapse; font: 400 13px/20px var(--body); }
.tbl th { text-align: left; font: 500 12px/16px var(--body); color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .nm { font-weight: 600; }
.tbl .sub { color: var(--text-3); font-size: 12px; line-height: 16px; }
.tbl-wrap { overflow: hidden; }

/* Knowledge */
.kn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mc { padding: 16px; }
.mc .big { font: 600 28px/32px var(--display); letter-spacing: -0.03em; }
.mc .big small { font-size: 14px; color: var(--text-3); letter-spacing: 0; }
.mc .meter { margin-top: 12px; }
.kn-stat .bg-arr { stroke-width: 6; }
.mc .s { margin-top: 8px; font: 400 12px/16px var(--body); color: var(--text-3); }
.src-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--raised); display: inline-grid; place-items: center; color: var(--text-2); flex: none; }
.src-ic svg { width: 14px; height: 14px; }
.src-name { display: flex; align-items: center; gap: 12px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
html { overflow-x: clip; }
.step, .cell, .app-main, .hd-thread { min-width: 0; }
.step { padding: 8px; display: flex; flex-direction: column; }
.step-vis { height: 260px; border-radius: 12px; background: var(--mock); border: 1px solid var(--line); overflow: hidden; position: relative; padding: 20px; }
.step h3 { margin: 24px 12px 0; font: 600 20px/28px var(--display); letter-spacing: -0.02em; }
.step p { margin: 8px 12px 12px; color: var(--text-2); font: 400 15px/24px var(--body); }
.srcs { display: flex; flex-direction: column; gap: 8px; }
.src-row { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font: 500 13px/20px var(--body); }
.src-row .src-name { flex: 1; min-width: 0; }
.src-row .src-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* tiny chat preview with colour sets (the orb takes the colour) */
.wg { display: grid; grid-template-columns: 1fr 104px; gap: 16px; height: 100%; }
.wg-win { border-radius: 18px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.wg-top { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font: 600 13px/16px var(--display); }
.wg-top .orb.xs { --s: 22px; }
.wg-body { flex: 1; padding: 4px 12px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.wg-hi { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font: 400 12px/18px var(--body); }
.wg-hi .orb.xs { --s: 18px; }
.wg-hi p { margin: 0; }
.wg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 26px; }
.wg-chip { height: 26px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--text); font: 500 11px/24px var(--body); }
.wg-in { margin: 0 10px 10px; padding: 8px 8px 6px 12px; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px var(--line-2), 0 8px 24px color-mix(in srgb, var(--wc, var(--glow)) 22%, transparent); font: 400 11px/16px var(--body); color: var(--text-3); }
.wg-in > span:first-child { display: block; }
.wg-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.wg-row .grow { flex: 1; }
.wg-row .pi-b { width: 22px; height: 22px; }
.wg-row .pi-b svg { width: 11px; height: 11px; }
.wg-row .wg-send { background: var(--wc, var(--glow)); color: #fff; transition: background-color .4s; }
.wg-ctl { display: flex; flex-direction: column; gap: 12px; font: 500 12px/16px var(--body); color: var(--text-2); }
.swatches { display: grid; grid-template-columns: repeat(3, 28px); gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: 0 0 0 2px var(--mock), 0 0 0 3px transparent; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--mock), 0 0 0 4px var(--text); }
.wg-name { color: var(--text-3); }
/* install */
.code {
  border-radius: 10px; background: var(--panel); border: 1px solid var(--line); padding: 12px 14px;
  font: 400 12px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-2); overflow: hidden; white-space: nowrap;
}
.code b { color: var(--accent); font-weight: 400; }
.code em { color: var(--text); font-style: normal; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-3); font: 500 12px/16px var(--body); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-tile { height: 48px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 12px; font: 600 13px/20px var(--body); }
.app-tile svg { width: 18px; height: 18px; fill: currentColor; color: var(--text-2); }
.live-row { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px dashed var(--line-2); font: 500 13px/20px var(--body); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cell { padding: 28px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.cell.w2 { grid-column: span 2; }
.cell h3 { margin: 0; font: 600 20px/28px var(--display); letter-spacing: -0.02em; }
.cell > p { margin: 8px 0 0; color: var(--text-2); font: 400 15px/24px var(--body); max-width: 440px; }
.cell .vis { margin-top: 24px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
/* chat demo */
.chat-cell { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; }
.chat-cell .txt { display: flex; flex-direction: column; }
.chat-cell .txt .seg { margin-top: 24px; align-self: flex-start; }
.chat-cell .langs-pick { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 12px; padding: 3px; gap: 2px; width: 100%; max-width: 336px; }
.chat-cell .langs-pick button { border-radius: 9px; justify-content: center; text-align: center; }
/* What bidi did: a checklist that fills in as the chat goes. Each step lights green with a soft glow when it's done,
   and the line joining the steps fills green behind it */
.caps { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.caps li { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 14px; }
.caps li:last-child { padding-bottom: 0; }
.caps li:not(:last-child)::before { content: ""; position: absolute; left: 9.25px; top: 22px; bottom: 2px; width: 1.5px; border-radius: 1px; background: var(--line-2); }
.caps li:not(:last-child)::after { content: ""; position: absolute; left: 9.25px; top: 22px; bottom: 2px; width: 1.5px; border-radius: 1px; background: var(--ok); transform: scaleY(0); transform-origin: top; transition: transform .6s ease .2s; }
.caps li.on:not(:last-child)::after { transform: scaleY(1); }
.cap-dot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; box-sizing: border-box; transition: background-color .35s, border-color .35s; }
.cap-dot svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: opacity .3s .1s, transform .35s cubic-bezier(.3,1.6,.5,1) .1s; }
.caps li.on .cap-dot { background: var(--ok); border: 0; box-shadow: 0 0 0 4px var(--ok-soft), 0 0 16px color-mix(in srgb, var(--ok) 55%, transparent); }
.caps li.on .cap-dot svg { opacity: 1; transform: none; }
.caps b { display: block; font: 500 13px/20px var(--body); color: var(--text-3); transition: color .3s; }
/* A decision (fix round 1): each step's second line keeps its room from the start and only fades in. The design grows
   it from max-height 0 as its step lights, so the cell grew while the chat played and moved what is below it (a
   layout shift, against the CLS budget). At rest the cell is therefore about 75 px taller than the design's first
   frame, and the same as its last. */
.caps small { display: block; font: 400 12px/16px var(--body); color: var(--text-3); opacity: 0; transition: opacity .4s ease; }
.caps li.on b { color: var(--text); }
.caps li.on small { opacity: 1; }
.chat-cell .replay { margin-top: auto; padding-top: 0; }
.chat-cell .caps + .replay { margin-top: 20px; }
.phone { border-radius: 24px; border: 1px solid var(--line-2); background: var(--mock); display: flex; flex-direction: column; height: auto; min-height: 460px; overflow: hidden; }
.chat-cell .phone { align-self: stretch; contain: size; }
.chat-cell .convo { min-height: 0; }
.phone-top { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.phone-top b { display: block; font: 600 14px/20px var(--display); letter-spacing: -0.01em; }
.phone-top small { display: flex; align-items: center; gap: 4px; font: 400 11px/16px var(--body); color: var(--text-3); }
.phone-top small i { width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }
.convo { flex: 1; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 48px); mask-image: linear-gradient(180deg, transparent 0, #000 48px); }
.convo .m-you { max-width: 84%; padding: 8px 12px; border-radius: 16px 16px 6px 16px; font: 400 13px/20px inherit; background: var(--bubble); }
.convo[dir="rtl"] .m-you { border-radius: 16px 16px 16px 6px; }
.convo .m-bot { grid-template-columns: 22px 1fr; gap: 10px; font: 400 13px/20px inherit; }
.convo .m-bot .orb.xs, .phone-top .orb.xs { --s: 24px; }
.convo .m-bot .orb.xs { --s: 22px; }
.convo .thinking-line { height: 22px; font-size: 13px; }
.phone-in { flex: none; margin: 0 12px 12px; padding: 10px 10px 8px 14px; border-radius: 18px; background: var(--panel);
  box-shadow: 0 0 0 1px var(--line-2), 0 10px 32px var(--glow-mid); font: 400 13px/20px var(--body); color: var(--text-3); }
.pi-txt { display: block; }
.pi-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.pi-row .grow { flex: 1; }
.pi-b { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); color: var(--text-2); display: grid; place-items: center; }
.pi-b svg { width: 14px; height: 14px; }
.pi-b.send { background: var(--pill); color: var(--pill-ink); }
.replay { align-self: flex-start; margin-top: 12px; }
/* lead card */
.lead-card { padding: 16px; }
.lead-card .top { display: flex; align-items: center; gap: 12px; }
.lead-card .top b { display: block; font: 600 14px/20px var(--body); }
.lead-card .top small { font: 400 12px/16px var(--body); color: var(--text-3); }
.lead-card .top .st { margin-left: auto; }
.kv { margin: 16px 0 0; display: grid; grid-template-columns: 72px 1fr; row-gap: 8px; font: 400 13px/20px var(--body); }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-behind { height: 8px; margin: 0 12px; border-radius: 0 0 12px 12px; background: var(--panel); border: 1px solid var(--line); border-top: 0; opacity: .6; }
.stack-behind.b2 { margin: 0 24px; opacity: .3; }
/* handoff */
.hand { display: flex; flex-direction: column; gap: 12px; }
.hand .evt { align-self: stretch; text-align: center; padding: 8px; border-radius: 8px; border: 1px dashed var(--line-2); color: var(--text-2); }
.who { display: flex; align-items: center; gap: 12px; padding: 12px; }
.who .av { position: relative; }
.who .av i { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 999px; border: 2px solid var(--panel); background: var(--ok); }
.who .av i.away { background: var(--text-3); }
.who b { display: block; font: 600 13px/20px var(--body); }
.who small { display: block; }
.who .grow { flex: 1; }
.who small { font: 400 12px/16px var(--body); color: var(--text-3); }
/* actions */
.acts { display: flex; flex-direction: column; gap: 8px; }
.act { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; }
.act .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; color: var(--text-2); flex: none; }
.act .ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
.act .ic svg.f { fill: currentColor; stroke: none; }
.act b { flex: 1; font: 600 13px/20px var(--body); }
/* draft */
.draftbox { padding: 12px; }
.draftbox .q { font: 400 12px/16px var(--body); color: var(--text-3); margin-bottom: 8px; }
.draftbox .txt { min-height: 60px; font: 400 13px/20px var(--body); }
.caret::after { content: ""; display: inline-block; width: 1px; height: 14px; margin-left: 1px; background: var(--text); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
.draftbox .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* memory */
.mem { padding: 16px; }
.mem .top { display: flex; align-items: center; gap: 12px; }
.mem .top b { font: 600 14px/20px var(--body); display: block; }
.mem .top small { font: 400 12px/16px var(--body); color: var(--text-3); }
.timeline { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding-left: 20px; font: 400 13px/20px var(--body); }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 999px; background: var(--text-3); }
.timeline li.now::before { background: var(--accent); }
.timeline small { display: block; color: var(--text-3); font-size: 12px; line-height: 16px; }

/* languages orbiting bidi: rings around the logo, language badges drift slowly on three orbits */
.langs-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.lc-txt > p { margin: 8px 0 0; color: var(--text-2); font: 400 15px/24px var(--body); max-width: 360px; }
.lc-list { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: 360px; }
.lc-list li { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); font: 500 12px/26px var(--body); color: var(--text-2); }
.lc-list li.more { border-style: dashed; color: var(--text-3); }
.orbit { --size: 420px; position: relative; width: var(--size); height: var(--size); flex: none; }
.oc { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid var(--line-2); transform: translate(-50%, -50%); pointer-events: none; }
.oc.c1 { width: 23%; height: 23%; opacity: .5; } .oc.c2 { width: 34%; height: 34%; opacity: .9; }
.oc.c3 { width: 47%; height: 47%; opacity: .4; } .oc.c4 { width: 60%; height: 60%; opacity: .9; }
.oc.c5 { width: 86%; height: 86%; opacity: .8; } .oc.c6 { width: 99%; height: 99%; opacity: .3; }
.oring { --dur: 90s; position: absolute; left: 50%; top: 50%; width: 0; height: 0; animation: orbit var(--dur) linear infinite; }
.oring.r1 { --r: calc(var(--size) * .19); }
.oring.r2 { --r: calc(var(--size) * .30); }
.oring.r3 { --r: calc(var(--size) * .43); }
.oi { position: absolute; left: 0; top: 0; transform: rotate(var(--a)) translateX(var(--r)); }
.ob { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--raised); box-shadow: 0 0 0 1px var(--line-2), 0 6px 20px rgba(0,0,0,.25);
  transform: rotate(calc(-1 * var(--a))); animation: unorbit var(--dur) linear infinite; animation-direction: inherit; }
.ob .flag { width: 26px; height: 26px; }
.ob .flag-ar { font-size: 15px; }
.os { position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; display: grid; place-items: center;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line-2); font: 600 11px/1 var(--display); color: var(--text-2); }
.os[lang] { font-family: system-ui, sans-serif; font-size: 12px; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes unorbit { from { transform: rotate(calc(-1 * var(--a))); } to { transform: rotate(calc(-1 * var(--a) - 360deg)); } }
.ocore { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%, -50%); display: grid; place-items: center; }
.oglow { position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, var(--glow-mid), transparent 68%); filter: blur(10px); animation: lpulse 3s ease-in-out infinite; }
.omark { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, var(--raised), var(--panel)); box-shadow: 0 0 0 1px var(--line-2), 0 0 0 8px color-mix(in srgb, var(--glow) 8%, transparent), 0 12px 32px rgba(0,0,0,.3); color: var(--text); }
.omark svg { width: 38px; height: 35px; }
@keyframes lpulse { 0%, 100% { opacity: .6; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@media (max-width: 1100px) { .orbit { --size: 360px; } }
@media (max-width: 900px) { .langs-cell { grid-template-columns: 1fr; justify-items: center; text-align: center; } .lc-txt { display: flex; flex-direction: column; align-items: center; } .lc-list { justify-content: center; } }
@media (max-width: 640px) {
  .orbit { --size: min(320px, calc(100vw - 72px)); }
  .ob { left: -20px; top: -20px; width: 40px; height: 40px; }
  .ob .flag { width: 22px; height: 22px; }
  .os { min-width: 18px; height: 18px; font-size: 10px; }
  .omark { width: 60px; height: 60px; } .omark svg { width: 26px; height: 24px; }
  .ocore { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .oring, .ob, .oglow, .stat.hot .ic::before { animation: none; } }

/* ---------- Control ---------- */
.ctl { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.ctl-list { margin: 40px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.ctl-list li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.ctl-list .ic { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text); grid-row: span 2; }
.ctl-list .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ctl-list b { font: 600 15px/24px var(--body); }
.ctl-list span { color: var(--text-2); font: 400 14px/20px var(--body); }
.rules { padding: 24px; box-shadow: var(--shadow); position: relative; }
.rules h4 { margin: 0; font: 600 18px/24px var(--display); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.rules .bt { height: 22px; padding: 0 8px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--body); color: var(--text-2); }
.rules .bt b { width: 14px; height: 14px; border-radius: 4px; background: var(--glow); color: #fff; font: 600 9px/14px var(--body); text-align: center; }
.rgroup { margin-top: 20px; }
.rgroup > span { display: block; margin-bottom: 8px; font: 500 12px/16px var(--body); color: var(--text-3); }
.rule { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: 400 13px/20px var(--body); margin-top: 6px; }
.rule .g { color: var(--ok); }
.rule.no .g { color: var(--text-2); }
.rsplit { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 500 13px/20px var(--body); }
.rsplit + .rsplit { margin-top: 0; padding-top: 12px; border-top: 0; }
.sw-btn { border: 0; padding: 2px 0; background: none; cursor: pointer; }

/* ---------- Custom work ---------- */
.custom { padding: 56px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; position: relative; overflow: hidden; }
.custom::after {
  content: ""; position: absolute; right: -10%; top: -40%; width: 60%; height: 120%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-mid), transparent 70%); filter: blur(40px); opacity: .7;
}
.custom h2 { font-size: 40px; line-height: 48px; }
.custom .lead { margin-left: 0; }
.custom .btn { margin-top: 32px; height: 48px; padding: 0 24px; font-size: 15px; }
.flow { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; }
.node { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); font: 500 13px/20px var(--body); white-space: nowrap; }
.node svg { width: 16px; height: 16px; flex: none; color: var(--text-2); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.node.hub { justify-content: center; background: var(--pill); color: var(--pill-ink); border-color: transparent; font: 600 15px/20px var(--display); letter-spacing: -0.02em; }
.node.hub svg { color: var(--pill-ink); fill: currentColor; stroke: none; width: 18px; }
.flow-col { display: flex; flex-direction: column; gap: 12px; }
.wires { height: 100%; width: 64px; }
.wires path { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.wires path.run { stroke: var(--glow); stroke-dasharray: 4 8; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.flow-in { display: flex; flex-direction: column; gap: 12px; }
.flow-hub { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: center; }

/* ---------- Final call ---------- */
.final { text-align: center; padding-block: 160px 128px; display: flex; flex-direction: column; align-items: center; }
.final h2 {
  font: 600 64px/72px var(--headline); letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--head-edge) 0%, var(--head-mid) 30%, var(--head-mid) 70%, var(--head-edge) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em;
}
.final .capture { margin-top: 40px; }
.facts { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: var(--text-3); font: 500 13px/20px var(--body); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 14px; height: 14px; color: var(--ok); }

/* ---------- Breakpoints ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chat-cell { grid-template-columns: 1fr; }
  .custom { grid-template-columns: 1fr; padding: 40px; }
}
@media (max-width: 900px) {
  .sec { padding-top: 96px; }
  .sec h2 { font-size: 40px; line-height: 48px; }
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell.w2 { grid-column: span 2; }
  .cell.q { grid-column: span 2; }
  .ctl { grid-template-columns: 1fr; gap: 48px; }
  .final h2 { font-size: 48px; line-height: 56px; }
  .hd { grid-template-columns: 1fr; }
  .hd-list { display: none; }
}
@media (max-width: 640px) {
  .sec { padding-top: 80px; }
  .sec-head { margin-bottom: 40px; }
  .sec h2, .custom h2 { font-size: 32px; line-height: 40px; }
  .sec .lead { font-size: 16px; line-height: 24px; }
  .show-tabs { margin-bottom: 24px; }
  .show-tabs .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .show-tabs .seg button { padding: 0 12px; flex: none; }
  .app-main { padding: 16px; }
  .app-top .ask span { display: none; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 24px; }
  .ov-grid, .kn-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell.w2, .cell.q { grid-column: auto; }
  .cell { padding: 20px; }
  .phone { height: 420px; min-height: 0; }
  .chat-cell .phone { contain: none; }
  .ctl-list { grid-template-columns: 1fr; gap: 20px; }
  .custom { padding: 28px 20px; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow .wires { width: 100%; height: 32px; }
  .final { padding-block: 112px 96px; }
  .final h2 { font-size: clamp(32px, 9vw, 40px); line-height: 1.15; }
  .wg { grid-template-columns: 1fr; }
  .wg-ctl { flex-direction: row; align-items: center; justify-content: space-between; }
  .wg-ctl > span { display: none; }
  .swatches { grid-template-columns: repeat(6, 28px); }
  .step-vis { height: auto; min-height: 220px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .lplot .l1, .lplot .l2 { stroke-dashoffset: 0; transition: none; } .lfill, .lmark, .lmark-y { transition: none; }
  .spin, .wires path.run, .typing i, .caret::after { animation: none; }
  .view { animation: none; }
}
.stat.st-down .bg-arr { right: -26px; bottom: -30px; }

/* Helpdesk: the chat plays out and the profile on the right fills in as bidi captures each detail */
.hd { grid-template-columns: 200px minmax(0, 1fr) 232px; height: 468px; min-height: 0; }
.tk .r1 .nm { font: inherit; color: var(--text); }
.hd-thread { min-height: 0; }
.th-msgs { min-height: 0; overflow: hidden; justify-content: flex-end; }
.th-msgs > * { animation: fadein .35s ease both; flex: none; }
.hd-prof { border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-top { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pf-top b { display: block; font: 600 14px/20px var(--display); letter-spacing: -0.01em; }
.pf-top small { display: block; font: 400 11px/16px var(--body); color: var(--text-3); }
.pf-av { width: 36px; height: 36px; border-radius: 999px; flex: none; display: grid; place-items: center; font: 600 14px/1 var(--display); color: var(--text-3);
  border: 1px dashed var(--line-2); transition: background-color .5s, color .5s, border-color .5s; }
.pf-av.got { color: #fff; border: 0; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, #fff 45%, var(--accent)), var(--accent) 55%, var(--glow));
  box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 18px color-mix(in srgb, var(--glow) 40%, transparent); }
.pf-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-fields li { position: relative; display: grid; grid-template-columns: 16px 1fr 16px; gap: 10px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; transition: background-color .6s; }
.pf-fields li > svg { width: 16px; height: 16px; color: var(--text-3); }
.pf-fields small { display: block; font: 400 11px/14px var(--body); color: var(--text-3); }
.pf-fields .v { display: block; min-height: 18px; font: 500 13px/18px var(--body); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-fields li:not(.got) .v::before { content: ""; display: block; width: 64%; height: 8px; margin-top: 5px; border-radius: 4px; background: var(--line); }
.pf-ok { width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; background: var(--ok); color: var(--panel); transform: scale(0); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.pf-ok svg { width: 11px; height: 11px; }
.pf-fields li.got .pf-ok { transform: scale(1); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 55%, transparent); }
.pf-fields li.flash { background: var(--ok-soft); }
.pf-fields li.got .v { animation: fadein .4s ease; }
.pf-saved { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font: 500 12px/16px var(--body); color: var(--text-2);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s; }
.pf-saved.on { opacity: 1; transform: none; }
.th-msgs .evt { display: flex; align-items: center; gap: 6px; }
.th-msgs .evt svg { width: 12px; height: 12px; color: var(--ok); }
@media (max-width: 1180px) { .hd { grid-template-columns: minmax(0, 1fr) 220px; } .hd-list { display: none; } }
@media (max-width: 640px) {
  .hd { grid-template-columns: 1fr; height: auto; }
  .th-msgs { height: 300px; flex: none; }
  .hd-prof { border-left: 0; border-top: 1px solid var(--line); }
}

/* Leads: click a lead to see its related chats and cases, click again to fold it */
.tbl tr.lr { cursor: pointer; transition: background-color .2s; }
.lr-btn { all: unset; display: flex; align-items: center; gap: 8px; min-height: 24px; font-weight: 600; cursor: pointer; border-radius: 4px; }
.lr-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tbl tr.lr:hover, .tbl tr.lr.open { background: color-mix(in srgb, var(--raised) 60%, transparent); }
.tbl tr.lr.open td { border-bottom-color: transparent; }
.tbl .nm { display: flex; align-items: center; gap: 8px; }
.tbl .rc { height: 18px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); font: 500 11px/16px var(--body); }
.tbl .wh { display: inline-flex; align-items: center; gap: 10px; }
.tbl .chev { width: 14px; height: 14px; color: var(--text-3); transition: transform .3s; }
.tbl tr.lr.open .chev { transform: rotate(180deg); }
.tbl tr.rel td { padding: 0 16px; }
.tbl tr.rel:not(.open) td { border-bottom: 0; }
.rel-in { display: none; }
.tbl tr.rel.open .rel-in { display: block; animation: fadein .35s ease; }
.rel-h { font: 500 11px/16px var(--body); color: var(--text-3); padding: 0 0 8px; }
.rel-list { list-style: none; margin: 0 0 14px; padding: 4px 12px; border-left: 1.5px solid var(--line-2); display: flex; flex-direction: column; }
.rel-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.rel-list li + li { border-top: 1px solid var(--line); }
.rel-list .ri { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.rel-list .ri svg { width: 16px; height: 16px; display: block; }
.rel-list .grow { flex: 1; min-width: 0; }
.rel-list b { display: block; font: 500 13px/18px var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-list small { display: block; font: 400 11px/16px var(--body); color: var(--text-3); }
.rel-list .st { font-size: 12px; }

/* Brings in a person: a small chat where Sara takes over from the bot */
.hchat { display: flex; flex-direction: column; overflow: hidden; }
.hc-top { position: relative; height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.hc-id { position: absolute; inset: 0 14px; display: flex; align-items: center; gap: 10px; transition: opacity .4s, transform .4s; }
.hc-id b { font: 600 13px/20px var(--body); }
.hc-id small { font: 400 11px/16px var(--body); color: var(--text-3); }
.hc-id .orb.xs { --s: 22px; }
.hc-sara { opacity: 0; transform: translateY(6px); }
.hchat.joined .hc-sara { opacity: 1; transform: none; }
.hchat.joined .hc-id:first-child { opacity: 0; transform: translateY(-6px); }
.hchat .av { position: relative; width: 24px; height: 24px; font-size: 10px; }
.hchat .av i { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 999px; border: 2px solid var(--panel); background: var(--ok); }
.hchat .av i.away { background: var(--text-3); }
.hc-sara .av { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.hc-msgs { height: 232px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.hc-msgs > * { flex: none; animation: fadein .35s ease both; }
.hc-msgs .y { align-self: flex-end; max-width: 80%; padding: 7px 11px; border-radius: 14px 14px 5px 14px; background: var(--bubble); font: 400 12.5px/18px var(--body); }
.hc-msgs .b { display: flex; gap: 8px; align-items: flex-start; max-width: 88%; font: 400 12.5px/18px var(--body); }
.hc-msgs .b .orb.xs { --s: 18px; margin-top: 1px; }
.hc-msgs .p { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.hc-msgs .p .bub { padding: 7px 11px; border-radius: 14px 14px 14px 5px; font: 400 12.5px/18px var(--body);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.hc-msgs .p .bub small { display: block; font: 600 11px/14px var(--body); color: var(--accent); margin-bottom: 2px; }
.hc-msgs .p .av { width: 22px; height: 22px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.hc-msgs .j { align-self: center; display: flex; align-items: center; gap: 8px; font: 500 11px/16px var(--body); color: var(--ok); }
.hc-msgs .j::before, .hc-msgs .j::after { content: ""; width: 28px; height: 1px; background: color-mix(in srgb, var(--ok) 50%, transparent); }
.hc-msgs .typing { display: inline-flex; gap: 3px; padding: 4px 0; }
.hc-msgs .typing i { width: 5px; height: 5px; border-radius: 999px; background: var(--text-3); animation: hcdot 1s infinite; }
.hc-msgs .typing i:nth-child(2) { animation-delay: .15s; } .hc-msgs .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hcdot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.hc-shift { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); font: 400 11px/16px var(--body); color: var(--text-3); }
.hc-shift > span { display: inline-flex; align-items: center; gap: 8px; }
.hchat.joined #hc-sst { color: var(--ok); }

/* Drafts card: the sources a draft came from, and tone buttons */
.dr-src { margin-bottom: 12px; }
.dr-h { font: 500 11px/16px var(--body); color: var(--text-3); margin-bottom: 8px; }
.dr-src ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dr-src li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); transition: border-color .5s, opacity .5s; opacity: .55; }
.dr-src li.got { opacity: 1; border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.dr-src .si { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.dr-src .si svg { width: 16px; height: 16px; display: block; }
.dr-src .grow { flex: 1; min-width: 0; }
.dr-src b { display: block; font: 500 13px/18px var(--body); }
.dr-src small { display: block; font: 400 11px/16px var(--body); color: var(--text-3); }
.dr-src li.got .pf-ok { transform: scale(1); box-shadow: 0 0 10px color-mix(in srgb, var(--ok) 55%, transparent); }
.draftbox .row { align-items: center; }
.draftbox .row .grow { flex: 1; }
.tone button { padding: 0 10px; font-size: 12px; }
.draftbox .row + .row { margin-top: 8px; }
.draftbox .row:has(.tone) { justify-content: flex-start; gap: 10px; }
.tone-l { font: 500 11px/16px var(--body); color: var(--text-3); }

/* Turns chats into leads: earlier leads stacked above the newest one */
.lead-mini { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lead-mini li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.lead-mini li:nth-child(1) { opacity: .6; } .lead-mini li:nth-child(2) { opacity: .8; }
.lead-mini .grow { flex: 1; min-width: 0; }
.lead-mini b { display: block; font: 600 13px/18px var(--body); }
.lead-mini small { display: block; font: 400 11px/16px var(--body); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-mini .st { font-size: 12px; }


/* ---- the hero on smaller screens --------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { padding-block: 64px 0; }
  .hero h1 { font-size: min(88px, calc((100vw - 64px) / 10.6)); }
  .strip { margin-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 640px) {
  .hero { padding-block: 48px 0; }
  .hero h1 { font-size: clamp(26px, calc((100vw - 32px) / 10.6), 48px); }
  .hero .sub { margin-top: 16px; font-size: 16px; line-height: 24px; }
  .capture { margin-top: 32px; }
  .field { height: 56px; padding: 4px 4px 4px 20px; }
  .field .btn { padding: 0 20px; font-size: 15px; }
  .strip { margin-top: 64px; padding-bottom: 64px; }
  .set { gap: 32px; padding-right: 32px; }
  .set li { font-size: 16px; }
  .set svg { width: 20px; height: 20px; }
}
@media (max-width: 370px) {
  .field { flex-direction: column; height: auto; padding: 4px; border-radius: 28px; gap: 4px; }
  .field input { flex: none; width: 100%; height: 48px; padding: 0 16px; }
  .field .btn { width: 100%; }
  .field::before { left: 16%; right: 16%; }
}
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; width: auto; justify-content: center; }
  .set { flex-wrap: wrap; justify-content: center; row-gap: 8px; padding-right: 0; max-width: 1040px; margin-inline: auto; }
  .set[aria-hidden="true"] { display: none; }
  .mq-toggle { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .m-you, .m-bot, .shimmer, .caret::after, .th-msgs > *, .hc-msgs > *, .pf-fields li.got .v, .tbl tr.rel.open .rel-in { animation: none; }
}
