:root {
  --acc: #3b37f2;
  --acc-ink: #fff;
  --bg: #ffffff;
  --soft: #f4f4f2;
  --soft-2: #ebebe8;
  --ink: #16171b;
  --ink-2: #44464d;
  --muted: #8a8c93;
  --line: rgba(22, 23, 27, 0.09);
  --ok: #12a06b;
  --warn: #d38a12;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141518;
  --soft: #1e1f23;
  --soft-2: #2a2b30;
  --ink: #f2f2f4;
  --ink-2: #c4c5cb;
  --muted: #8a8c93;
  --line: rgba(255, 255, 255, 0.09);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

.app { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; max-width: 720px; margin: 0 auto; }
body:not(.embed) { background: var(--soft); }
body:not(.embed) .app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 650; font-size: 0.98rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.78rem; }
.on { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--acc) var(--logo, none) center / 62% no-repeat; color: var(--acc-ink); font-weight: 700; font-size: 0.9rem; }
.av.logo { background-color: var(--soft); }
.acts { display: flex; gap: 2px; }
.ic { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; text-decoration: none; }
.ic:hover { background: var(--soft); color: var(--ink); }
.ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* log */
.log { overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.hello { margin: auto 0 4px; }
.hello__t { margin: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.hello__s { margin: 4px 0 14px; color: var(--muted); }
.sugg { display: grid; gap: 6px; }
.sugg button { justify-self: start; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink-2); font-size: 0.9rem; text-align: left; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.sugg button:hover { border-color: var(--acc); color: var(--ink); }
.app[data-state="chat"] .hello { display: none; }

.msg { max-width: 100%; animation: in 0.25s ease both; }
@keyframes in { from { opacity: 0; transform: translateY(4px); } }
.msg--u { align-self: flex-end; max-width: 82%; padding: 9px 13px; border-radius: 16px 16px 4px 16px; background: var(--acc); color: var(--acc-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--a { align-self: stretch; display: grid; gap: 10px; }
.sets:empty { display: none; }
.sets { display: grid; gap: 10px; }
.md p { margin: 0 0 0.5em; }
.md p:last-child { margin: 0; }
.md ul { margin: 0 0 0.5em; padding-left: 1.1em; }
.md li { margin: 0.15em 0; }
.md strong { font-weight: 650; }
.md a { color: var(--acc); text-underline-offset: 2px; }
.md:empty { display: none; }

/* thinking */
.think { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.86rem; }
.think i { display: inline-flex; gap: 3px; }
.think i::before, .think i::after, .think i span { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.think i span { animation-delay: 0.15s; }
.think i::after { animation-delay: 0.3s; }
@keyframes dot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* products */
.prods { display: grid; gap: 8px; }
.prods__h { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.p { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.p--pick { border-color: color-mix(in srgb, var(--acc) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 10%, transparent); }
.p__img { width: 64px; height: 64px; border-radius: 10px; background: #fff; object-fit: contain; }
.p__b { min-width: 0; display: grid; gap: 1px; }
.p__tag { color: var(--acc); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.p__n { color: var(--ink); font-weight: 600; font-size: 0.92rem; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.p__n:hover { text-decoration: underline; }
.p__note { color: var(--muted); font-size: 0.8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p__m { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; font-size: 0.82rem; color: var(--muted); }
.p__m b { color: var(--ink); font-size: 0.95rem; font-weight: 700; }
.p__m s { font-size: 0.8rem; }
.p__m .sale { color: #d0352b; }
.p__st::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--warn); vertical-align: 1px; }
.p__st.in::before { background: var(--ok); }
.p__buy { padding: 8px 12px; border: 0; border-radius: 10px; background: var(--acc); color: var(--acc-ink); font-size: 0.84rem; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer; }
.p__buy:hover { filter: brightness(0.92); }
.p__buy.done { background: var(--soft-2); color: var(--ink); }
.p__buy--call { background: var(--soft); color: var(--ink); }

.cmp { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.cmp table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cmp th, .cmp td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp tr:last-child > * { border-bottom: 0; }
.cmp thead th { font-weight: 650; background: var(--soft); }
.cmp tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }

/* composer */
.ask { display: flex; align-items: flex-end; gap: 6px; margin: 8px 12px max(12px, env(safe-area-inset-bottom)); padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); transition: border-color 0.15s, box-shadow 0.15s; }
.ask:focus-within { border-color: color-mix(in srgb, var(--acc) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 12%, transparent); }
.ask textarea { flex: 1; min-height: 36px; max-height: 140px; padding: 7px 0; border: 0; background: none; resize: none; outline: none; line-height: 1.45; }
.ask textarea::placeholder { color: var(--muted); }
.ask__go { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 11px; background: var(--acc); color: var(--acc-ink); cursor: pointer; }
.ask__go:disabled { background: var(--soft-2); color: var(--muted); cursor: default; }
.ask__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ask__mic.on { background: #d0352b; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- pult demo (/<slug>/pult): products large on the left, chat on the right */
.pult[hidden] { display: none; }
.onpult { display: none; margin: 0; color: var(--muted); font-size: 0.84rem; }
@media (min-width: 980px) {
  body.with-pult { display: grid; grid-template-columns: minmax(0, 1fr) 420px; background: var(--soft); }
  body.with-pult .app { max-width: none; margin: 0; height: 100dvh; box-shadow: -1px 0 0 var(--line); }
  body.with-pult .sets .prods { display: none; }
  body.with-pult .onpult { display: block; }
  body.with-pult .sugg { display: none; }
  .pult { height: 100dvh; overflow-y: auto; padding: clamp(24px, 3vw, 44px); position: relative; }
}
@media (max-width: 979px) { .pult { display: none; } }
.pult__empty { max-width: 760px; margin: 8vh auto 0; }
.pult.has .pult__empty { display: none; }
.pult__brand { margin: 0 0 18px; color: var(--acc); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.pult__t { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; }
.pult__t span { color: var(--muted); font-weight: 600; }
.pult__s { margin: 18px 0 24px; max-width: 56ch; color: var(--ink-2); font-size: 1.05rem; }
.pult__try { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pult__try button { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--ink); text-align: left; font-size: 0.98rem; font-weight: 550; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.pult__try button:hover { border-color: var(--acc); transform: translateY(-1px); }
.pult__sets { display: grid; gap: 34px; max-width: 1200px; margin: 0 auto; }
.bs { animation: in 0.35s ease both; }
.bs + .bs { padding-top: 30px; border-top: 1px solid var(--line); opacity: 0.85; }
.bs__h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.bs__h h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.8rem); letter-spacing: -0.02em; }
.bs__h small { color: var(--muted); white-space: nowrap; }
.bs__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.bc { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -32px rgba(0, 0, 0, 0.45); overflow: hidden; }
.bc--pick { box-shadow: 0 0 0 2px var(--acc), 0 22px 48px -30px rgba(0, 0, 0, 0.5); }
.bc__tag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.bc__sale { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 4px 9px; border-radius: 999px; background: #d0352b; color: #fff; font-size: 0.72rem; font-weight: 700; }
.bc__img { aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 14px; background: #fff; }
.bc__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bc__b { display: flex; flex-direction: column; gap: 5px; flex: 1; padding: 4px 16px 16px; }
.bc__brand { color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.bc__n { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.bc__note { margin: 2px 0 0; padding-left: 9px; border-left: 2px solid var(--acc); color: var(--ink-2); font-size: 0.86rem; line-height: 1.4; }
.bc__m { margin: auto 0 0; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.bc__m b { font-size: 1.3rem; letter-spacing: -0.02em; }
.bc__m b.sale { color: #d0352b; }
.bc__m s { color: var(--muted); font-size: 0.86rem; }
.bc__acts { display: flex; gap: 6px; margin-top: 8px; }
.bc__buy, .bc__more { flex: 1; display: inline-flex; justify-content: center; align-items: center; min-height: 40px; border-radius: 11px; font-size: 0.88rem; font-weight: 650; text-decoration: none; }
.bc__buy { background: var(--acc); color: var(--acc-ink); }
.bc__buy.done { background: var(--soft-2); color: var(--ink); }
.bc__buy--call { background: var(--soft); color: var(--ink); }
.bc__more { background: var(--soft); color: var(--ink); }
.cmp--big { margin-top: 14px; background: var(--bg); }
.cmp--big table { font-size: 0.92rem; }

/* corner style chosen in the portal (Izgled asistenta) */
:root[data-radius="soft"] .msg--u, :root[data-radius="soft"] .p, :root[data-radius="soft"] .ask, :root[data-radius="soft"] .sugg button, :root[data-radius="soft"] .p__buy, :root[data-radius="soft"] .ask__go, :root[data-radius="soft"] .cmp, :root[data-radius="soft"] .bc, :root[data-radius="soft"] .ic, :root[data-radius="soft"] .p__img { border-radius: 8px; }
:root[data-radius="sharp"] .msg--u, :root[data-radius="sharp"] .p, :root[data-radius="sharp"] .ask, :root[data-radius="sharp"] .sugg button, :root[data-radius="sharp"] .p__buy, :root[data-radius="sharp"] .ask__go, :root[data-radius="sharp"] .cmp, :root[data-radius="sharp"] .bc, :root[data-radius="sharp"] .ic, :root[data-radius="sharp"] .p__img, :root[data-radius="sharp"] .av { border-radius: 3px; }
