/* The agent window (17/11/2026, DECISIONS ו1333, the owner: "מאשר" on round 2 of
   https://claude.ai/artifact/1VjtLzWeP9978K5hraEVMF): ONE look for the site's eight chats — Maya, Niv, the property's
   agent, the personal agent, the edit agent, the seller's interview, the renovation client and a project page.
   Markup: templates/_agent_window.html. Behaviour: assets/brand/agent-window.js (NPAgent). Words: server/agent_window.py.
   A page sets only WHERE the window sits and how big it is (width, height, position); the look is here.
   tests/test_agent_window_1333.py fails on a chat that draws a window of its own.
   Its own colours, the same in both themes, like the site bar (ו1330). */
.ag { --t: #0f7368; --t2: #0b5f56; --t3: #12857a; --n: #16294a; --ink2: #4a5a70; --mute: #6b7787; --hair: rgba(22,41,74,.08);
  position: relative; display: flex; flex-direction: column; min-height: 0;
  border-radius: 28px; overflow: hidden; isolation: isolate; color: var(--n); direction: rtl; text-align: right;
  font: 400 15px/1.6 'Assistant', system-ui, sans-serif; background: #f7f9f8;
  /* no frame you see (ו1333 §5): a soft shadow and a one-pixel line, almost transparent */
  box-shadow: 0 0 0 1px rgba(22,41,74,.07), 0 1px 1px rgba(22,41,74,.04), 0 8px 16px -8px rgba(22,41,74,.16), 0 40px 80px -32px rgba(22,41,74,.45); }
.ag[hidden] { display: none; }
.ag *, .ag *::before, .ag *::after { box-sizing: border-box; }
.ag button { font: inherit; cursor: pointer; margin: 0; }
/* the aurora behind everything: the site's colour line, breathed out — and its dots */
.ag::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 100% 0%, rgba(143,224,210,.55), transparent 70%),
    radial-gradient(55% 32% at 0% 6%, rgba(188,217,242,.55), transparent 70%),
    radial-gradient(70% 40% at 20% 100%, rgba(207,196,240,.35), transparent 70%),
    radial-gradient(50% 30% at 100% 92%, rgba(248,201,174,.28), transparent 70%); }
.ag::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(22,41,74,.06) .8px, transparent 1px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }

/* the header: glass over the aurora — the robot in a turning ring of the brand line, a green dot that breathes, "מאומת" */
.ag-h { flex: none; position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px 12px; min-width: 0;
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(255,255,255,.7); box-shadow: 0 1px 0 var(--hair); }
.ag-av { position: relative; flex: none; width: 50px; height: 50px; border-radius: 50%; padding: 2.5px;
  background: conic-gradient(from 0deg, #8fe0d2, #bcd9f2, #cfc4f0, #f8c9ae, #f6dc9b, #8fe0d2); animation: agspin 8s linear infinite; }
.ag-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #eef7f4; border: 2.5px solid #fff; animation: agspin 8s linear infinite reverse; }
@keyframes agspin { to { transform: rotate(360deg); } }
.ag-av i { position: absolute; bottom: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; animation: agpulse 2.4s ease-out infinite; }
@keyframes agpulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.ag-id { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ag-id b { display: flex; align-items: center; gap: 6px; min-width: 0; font: 800 16.5px/1.2 'Heebo', sans-serif; letter-spacing: -.01em; color: var(--n); }
.ag-id b > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-id b svg { flex: none; width: 16px; height: 16px; color: var(--t); }
.ag-id small { font: 600 13px/1.35 'Assistant', sans-serif; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ic { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; display: grid; place-items: center; color: var(--ink2); background: transparent; padding: 0; text-decoration: none; }
.ag-ic:hover { background: rgba(22,41,74,.06); color: var(--n); }
.ag-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* the property strip under the header (the property page, the personal agents) */
.ag-prop { flex: none; display: flex; align-items: center; gap: 12px; margin: 12px 14px 4px; padding: 8px; padding-inline-end: 12px; border-radius: 18px; min-width: 0;
  background: #fff; box-shadow: 0 0 0 1px var(--hair), 0 10px 24px -18px rgba(22,41,74,.5); }
.ag-prop[hidden] { display: none; }
.ag-prop .thumb { width: 52px; height: 52px; border-radius: 13px; flex: none; object-fit: cover; background: linear-gradient(180deg, #cfe6f5, #f6e7d6); box-shadow: inset 0 0 0 1px rgba(22,41,74,.06); }
.ag-prop > span { flex: 1; min-width: 0; display: grid; gap: 1px; font: 600 13px/1.35 'Assistant'; color: var(--ink2); }
.ag-prop > span > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-prop b { font: 800 14.5px/1.3 'Heebo'; color: var(--n); }
.ag-prop small { font: inherit; }
.ag-prop em { font: 800 14px/1 'Heebo'; font-style: normal; color: var(--t); white-space: nowrap; }

/* the conversation */
.ag-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.ag-b > * { flex: none; }

/* the first screen: a card with the robot coming out of its corner, one sentence, the trust line, the ready questions */
.ag-wel { position: relative; margin-top: 40px; padding: 18px 18px 8px; border-radius: 22px; background: #fff;
  box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -26px rgba(22,41,74,.55); }
.ag-wel .rb { position: absolute; top: -34px; left: 10px; width: 84px; height: auto; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(22,41,74,.22)); }
.ag-wel h3 { margin: 0 0 6px; max-width: calc(100% - 92px); font: 800 21px/1.25 'Heebo'; letter-spacing: -.015em; color: var(--n); }
.ag-wel p { margin: 0 0 12px; max-width: calc(100% - 70px); font: 400 15px/1.6 'Assistant'; color: var(--ink2); white-space: pre-line; overflow-wrap: anywhere; }
.ag-wel p + p { max-width: none; }
.ag-trust { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; padding: 8px 10px; border-radius: 12px; background: #f1f8f5; color: #0c5e58; font: 700 12.5px/1.4 'Assistant'; }
.ag-trust svg { flex: none; width: 16px; height: 16px; }
.ag-note { margin: 0 0 8px; padding: 8px 10px; border-radius: 12px; border: 1px dashed rgba(22,41,74,.16); font: 600 12.5px/1.5 'Assistant'; color: var(--ink2); white-space: pre-line; }
.ag-note .full { display: none; }
.ag-note.open .full { display: block; margin-top: 4px; }
.ag-note button { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1.5px solid var(--t); border-radius: 999px; background: #fff;
  color: var(--t2); font: 700 12.5px 'Heebo'; cursor: pointer; transition: background-color .15s, color .15s; }
/* ו1175 on the property page's notice: the brand colour, deep teal under the mouse, 44px to a finger on a phone */
.ag-note button:hover, .ag-note button:focus-visible { background: var(--t2); border-color: var(--t2); color: #fff; }
@media (max-width: 900px) { .ag-note button { min-height: 44px; } }
.ag-qs { list-style: none; margin: 6px -6px 0; padding: 0; }
.ag-qs li { border-top: 1px solid var(--hair); }
.ag-qs li:first-child { border-top: 0; }
.ag-qs button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 8px; border: 0; border-radius: 12px; background: none; text-align: right;
  font: 700 15px/1.3 'Heebo'; color: var(--n); }
.ag-qs button:hover { background: #f5f9f8; }
.ag-qs .qi { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.ag-qs .qi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-qs .q1 { background: #e3f4ef; color: #0f7368; } .ag-qs .q2 { background: #e6eefa; color: #2b5d97; } .ag-qs .q3 { background: #efeafb; color: #5b48a8; } .ag-qs .q4 { background: #fdf0e6; color: #a5592a; }
.ag-qs .qt { flex: 1; min-width: 0; }
.ag-qs .qa { flex: none; color: #b3bdc8; }
.ag-qs .qa svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* the messages */
.ag-day { display: flex; align-items: center; gap: 10px; margin: 8px 6px 4px; font: 700 11.5px/1 'Heebo'; color: var(--mute); letter-spacing: .02em; }
.ag-day::before, .ag-day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(22,41,74,.14), transparent); }
.ag-u { align-self: flex-end; max-width: 80%; padding: 10px 15px 11px; border-radius: 20px; border-end-end-radius: 6px; color: #fff;
  font: 600 15px/1.5 'Assistant'; white-space: pre-line; overflow-wrap: anywhere; background: linear-gradient(160deg, #23406b 0%, #16294a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 20px -12px rgba(22,41,74,.8); }
.ag-u img { display: block; max-width: 100%; border-radius: 12px; margin-bottom: 6px; }
.ag-meta { display: flex; align-items: center; gap: 4px; font: 600 11px/1 'Assistant'; color: var(--mute); margin: 2px 6px 6px; }
.ag-meta.u { align-self: flex-end; }
.ag-meta svg { width: 15px; height: 15px; color: #3aa6e8; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ag-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.ag-row .mi { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eef7f4; box-shadow: 0 0 0 2px #fff, 0 2px 6px -2px rgba(22,41,74,.3); }
/* the robot only beside the first bubble of a run */
.ag-row.cont .mi { visibility: hidden; }
.ag-a { min-width: 0; max-width: 84%; padding: 12px 15px 10px; border-radius: 20px; border-end-start-radius: 6px; background: #fff; color: var(--n);
  font: 400 15px/1.6 'Assistant'; white-space: pre-line; overflow-wrap: anywhere; box-shadow: 0 0 0 1px var(--hair), 0 10px 24px -18px rgba(22,41,74,.55); }
.ag-a a { color: var(--t2); font-weight: 700; }
.ag-a img { display: block; max-width: 100%; border-radius: 12px; margin: 4px 0; }
.ag-a .ag-flag { display: inline-block; margin-bottom: 6px; padding: 3px 9px; border-radius: 999px; background: #fbf0d8; color: #7a5a10; font: 700 12px/1.3 'Heebo'; white-space: normal; }
.ag-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; white-space: normal; }
.ag-facts span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #f3f7f6; font: 700 13px/1.25 'Heebo'; color: var(--n); }
.ag-facts span svg { flex: none; width: 15px; height: 15px; color: var(--t); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ag-src { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(22,41,74,.12); font: 600 12px/1.35 'Assistant'; color: var(--mute); white-space: normal; }
.ag-facts + .ag-src { margin-top: 0; }
.ag-src svg { flex: none; width: 14px; height: 14px; color: var(--t); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* the next questions: pills that go down a line — never a strip that scrolls sideways */
.ag-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; margin-inline-start: 36px; }
.ag-sugg button, .ag-sugg a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 13px; border: 0; border-radius: 999px; background: rgba(255,255,255,.9);
  font: 700 13.5px/1.2 'Heebo'; color: var(--t2); text-align: right; text-decoration: none; box-shadow: 0 0 0 1px rgba(15,115,104,.18), 0 6px 14px -10px rgba(15,115,104,.7); }
.ag-sugg button:hover, .ag-sugg a:hover { background: #fff; box-shadow: 0 0 0 1px rgba(15,115,104,.4), 0 6px 14px -10px rgba(15,115,104,.7); }
.ag-sugg svg { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-sugg.col { flex-direction: column; align-items: stretch; }
.ag-sugg.col button, .ag-sugg.col a { justify-content: space-between; border-radius: 14px; min-height: 44px; }
.ag-typing { display: inline-flex; align-items: center; gap: 5px; padding: 14px 16px; border-radius: 20px; border-end-start-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--hair), 0 10px 24px -18px rgba(22,41,74,.55); }
.ag-typing i { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #12857a, #2b5d97); animation: agdot 1.3s infinite ease-in-out; }
.ag-typing i:nth-child(2) { animation-delay: .16s; } .ag-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes agdot { 0%, 60%, 100% { transform: translateY(0) scale(.85); opacity: .45; } 30% { transform: translateY(-5px) scale(1); opacity: 1; } }
/* an action that opens inside the conversation ("לתאם ביקור") */
.ag-act { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, #0f7368, #12405a); color: #fff;
  box-shadow: 0 16px 30px -18px rgba(15,115,104,1); margin: 4px 0 2px; }
.ag-act .ai { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.ag-act .ai svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-act > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 1px; font: 600 12.5px/1.35 'Assistant'; color: #cdeee8; }
.ag-act b { font: 800 15px/1.2 'Heebo'; color: #fff; }
.ag-act .go { flex: none; min-height: 40px; padding: 9px 14px; border: 0; border-radius: 999px; background: #fff; color: #0c5e58; font: 800 13.5px/1 'Heebo'; text-decoration: none; display: inline-flex; align-items: center; }
.ag-act .go:hover { background: #e9f7f3; }

/* the composer: a floating card, with the site's one recording button (ו1310) */
.ag-f { flex: none; margin: 0; padding: 10px 14px 14px; min-width: 0; }
.ag-in { display: flex; align-items: center; gap: 8px; padding: 6px; padding-inline-start: 16px; border-radius: 22px; background: #fff; min-width: 0;
  box-shadow: 0 0 0 1px var(--hair), 0 14px 30px -18px rgba(22,41,74,.55); }
.ag-in:focus-within { box-shadow: 0 0 0 2px rgba(15,115,104,.45), 0 14px 30px -18px rgba(22,41,74,.55); }
.ag-in input, .ag-in textarea { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: 0; background: transparent; padding: 0; color: var(--n);
  font: 400 15.5px/1.4 'Assistant', sans-serif; resize: none; }
.ag-in textarea { padding: 11px 0; max-height: 140px; overflow-y: auto; }
.ag-in input::placeholder, .ag-in textarea::placeholder { color: #7d8896; opacity: 1; }
.ag-in .ag-mic, .ag-in .vx-mic.ag-mic { flex: none; width: 44px; height: 44px; min-width: 44px; border: 0; border-radius: 16px; display: grid; place-items: center; color: #fff; padding: 0;
  background: linear-gradient(145deg, #13917f, #0c5e58); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 16px -8px rgba(15,115,104,.95); }
.ag-in .ag-mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ag-in .ag-mic:disabled { opacity: .5; cursor: default; }
.ag-in .ag-extra { flex: none; }
.ag-foot { margin: 8px 8px 0; text-align: center; font: 600 11.5px/1.45 'Assistant'; color: var(--mute); }
.ag-foot b { color: var(--ink2); }
.ag-foot a { color: var(--t2); font-weight: 700; }
.ag :focus-visible { outline: 3px solid var(--n); outline-offset: 2px; }
.ag .ag-in :focus-visible { outline: 0; }
.ag-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the frame in the brand line (ו1333 §5 → ו1338, the owner 17/11: "אני רוצה שהמסגרת תישאר תמיד"): always on, on every
   window and every screen, and always turning (the owner: "כן" to turning all the time) */
@property --ag-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.ag-ring { position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; padding: 2.5px; opacity: 1;
  background: conic-gradient(from var(--ag-a), #14a594, #4f9be0, #8c74de, #ef8f5f, #e2b34c, #14a594);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 8px rgba(20,165,148,.55)); animation: agring 3s linear infinite; }
@keyframes agring { to { --ag-a: 360deg; } }

/* a phone, the whole screen or a sheet (ag-flat): no shadow — the frame stays (ו1338) */
.ag.ag-flat { box-shadow: none; }
.ag.ag-full { border-radius: 0; }
/* a phone, the whole screen: the floating accessibility button (a11y-menu.css, the left edge) has no free spot over a
   full conversation, and sat on the microphone — the composer leaves it the left edge */
@media (max-width: 767px) { .ag.ag-full .ag-f { padding-left: 66px; } }
@media (max-width: 520px) { .ag-wel h3, .ag-wel p:first-of-type { max-width: calc(100% - 78px); } .ag-trust { font-size: 12px; } .ag-b { padding-inline: 12px; } }
/* ו1364: the keyboard up on a phone — the window that holds the field is the whole visible screen (agent-window.js) */
html.ag-kb, html.ag-kb body { overflow: hidden; }
html.ag-kb .ag.ag-typing { position: fixed; inset: var(--ag-vt, 0px) 0 auto 0; width: auto; height: var(--ag-vh, 100vh); max-height: none;
  max-width: none; margin: 0; border-radius: 0; padding-bottom: 0; transform: none; animation: none; z-index: 2147483000; }
html.ag-kb .ag.ag-typing .ag-h::before { display: none; }
html.ag-kb .ag.ag-typing .ag-f { padding-bottom: 8px; }
html.ag-kb .ag.ag-typing .ag-foot { display: none; }
/* an iPhone zooms the page into a field whose text is under 16px — on a phone the composer writes at 16 */
@media (max-width: 900px) { .ag-in input, .ag-in textarea { font-size: 16px; } }
/* who asked for less motion: everything stands still, the frame too (it stays, ו1338) */
@media (prefers-reduced-motion: reduce) {
  .ag-av, .ag-av img, .ag-av i, .ag-typing i { animation: none; }
  .ag .ag-ring { animation: none; }
}
