/* Bluconta landing: what is particular to each product demo (the window and shared pieces are 06-app.css)
   and Blu's panel. landing-demos.js arms a demo (hiding what will appear) and adds its step classes
   (s-*); unarmed (no JS, reduced motion) each one shows its last frame. Markup in
   partials/landing/demo_*.html, blu.html and the contador's thread in contador.html. */

.demo { position: relative; }
.demo [data-at] { transition: opacity 380ms ease, transform 460ms var(--ease); }
.demo.is-armed [data-at]:not(.is-in) { opacity: 0; transform: translateY(8px); }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* A control whose label changes keeps all its labels in one cell, so it never changes width. */
.rq-stamp, .qx-btn, .bq-yes { display: inline-grid; place-items: center; min-height: 32px; padding: 0 14px; border-radius: 10px; background: var(--pw-brand); color: var(--white); font-size: 12px; font-weight: 600; white-space: nowrap; transition: transform 150ms ease, background-color 220ms ease; }
.rq-stamp > span, .qx-btn > span, .bq-yes > span, .ix-drop > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 7px; visibility: hidden; }
.rq-stamp .b0, .qx-btn .b2, .bq-yes .b0, .ix-drop .d0 { visibility: visible; }
.rq-stamp .b1::before, .qx-btn .b1::before, .bq-yes .b1::before, .ix-drop .d1::before { content: ""; width: 11px; height: 11px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: var(--white); border-radius: 50%; animation: spin 700ms linear infinite; }
.is-armed.s-press:not(.s-work) :is(.rq-stamp, .qx-btn, .bq-yes) { transform: scale(0.95); }
.is-armed.s-work:not(.s-done) :is(.rq-stamp, .bq-yes) { background: var(--pw-brand-dark); }
.is-armed.s-work:not(.s-done) :is(.rq-stamp, .bq-yes) .b0 { visibility: hidden; }
.is-armed.s-work:not(.s-done) :is(.rq-stamp, .bq-yes) .b1 { visibility: visible; }

/* Factura rápida: the "+" menu beside the rail, the panel with its client and product pickers, then the
   precalc window. The menu and the panel are two boxes that trade places and each picker's list drops
   over what is under it, so nothing in the window moves to make room (a sheet that changed height on
   every step registered as layout shift on phones). At rest (no JS, reduced motion, off screen) the demo
   shows the precalc window, the frame that says most; the stamped dialog (06-app.css .app-ok) only comes
   at the end of the story. Tall enough for that window in the computer layout; 560px is where the card
   gets too narrow for it and the phone layout takes over (the end of this file). */
.win--rq { min-height: 480px; --cols: 62px minmax(0, 1fr) 112px 0; }
.win--rq:not(.is-armed) .app-ok { visibility: hidden; opacity: 0; }
.rq-fly { position: absolute; z-index: 22; left: 72px; top: 54px; width: 256px; border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.05), 0 8px 32px rgba(16, 17, 22, 0.16); visibility: hidden; opacity: 0; transform: translateX(-8px) scale(0.98); transform-origin: left top; transition: opacity 200ms ease, transform 320ms var(--ease), visibility 0s linear 200ms; }
.is-armed.s-menu:not(.s-quick) .rq-menu, .is-armed.s-quick:not(.s-modal) .rq-quick { visibility: visible; opacity: 1; transform: none; transition: opacity 200ms ease, transform 320ms var(--ease), visibility 0s; }
.rq-menu { display: grid; gap: 2px; padding: 6px; }
.rq-opt { display: grid; grid-template-columns: 30px minmax(0, 1fr) 13px; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.rq-opt[data-quick] { background: var(--pw-soft); }
.rq-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(47, 123, 233, 0.09); color: var(--pw-brand); }
.rq-ic svg { width: 15px; height: 15px; }
.rq-opt-t { display: grid; gap: 1px; min-width: 0; }
.rq-opt-t small { overflow: hidden; font-size: 10.5px; color: var(--pw-muted); white-space: nowrap; text-overflow: ellipsis; }
.rq-chev { width: 13px; height: 13px; color: var(--pw-muted); }
.rq-quick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; }
.rq-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; padding-bottom: 9px; border-bottom: 1px solid var(--pw-line); font-size: 12.5px; }
.rq-h svg { width: 14px; height: 14px; color: var(--pw-body); }
.rq-l { margin-top: 2px; font-size: 10.5px; font-weight: 600; color: var(--pw-body); }
/* A picker: its search field and, in the same cell, the chip a pick leaves; its list hangs under it.
   They trade places by opacity, which a hidden panel's children cannot override. */
.rq-field { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.rq-in, .rq-chip { grid-area: 1 / 1; display: flex; align-items: center; height: 30px; padding: 0 10px; overflow: hidden; font-size: 11.5px; white-space: nowrap; transition: opacity 160ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.rq-in { border: 1px solid #DCDFE6; border-radius: 9px; color: #8D94A3; }
.rq-chip { justify-content: space-between; gap: 8px; border-radius: 8px; background: #F0F6FE; font-weight: 500; opacity: 0; }
.rq-chip > span { color: var(--pw-muted); }
.is-armed.s-client .rq-field--c .rq-in, .is-armed.s-product .rq-field--p .rq-in { opacity: 0; }
.is-armed.s-client .rq-field--c .rq-chip, .is-armed.s-product .rq-field--p .rq-chip { opacity: 1; }
.rq-res { position: absolute; z-index: 2; top: calc(100% + 4px); left: 0; right: 0; display: grid; padding: 4px; border-radius: 10px; background: var(--white); box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.06), 0 12px 28px -8px rgba(16, 24, 40, 0.3); opacity: 0; transition: opacity 160ms ease; }
.rq-res > span { display: grid; gap: 1px; padding: 6px 8px; border-radius: 8px; }
.rq-res > span:first-child { background: var(--pw-soft); }
.rq-res b { overflow: hidden; font-size: 11px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.rq-res small { font-size: 10px; color: var(--pw-muted); }
/* The picker in turn has the focus ring and its list open. */
.is-armed.s-quick:not(.s-client) .rq-field--c .rq-in, .is-armed.s-client:not(.s-product) .rq-field--p .rq-in { border-color: var(--pw-brand); box-shadow: 0 0 0 3px rgba(47, 123, 233, 0.16); }
.is-armed.s-quick:not(.s-client) .rq-field--c .rq-res, .is-armed.s-client:not(.s-product) .rq-field--p .rq-res { opacity: 1; }
.rq-go { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; margin-top: 6px; border-radius: 10px; background: var(--pw-brand); color: var(--white); font-size: 11.5px; font-weight: 600; opacity: 0.45; transition: opacity 200ms ease; }
.rq-go svg { width: 12px; height: 12px; }
.is-armed.s-product .rq-go { opacity: 1; }
.rq-modal { position: absolute; z-index: 24; inset: var(--app-inset) var(--app-inset) 0; display: grid; place-items: center; border-radius: 14px 14px 0 0; background: rgba(16, 24, 40, 0.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity 200ms ease, visibility 0s; }
.is-armed:not(.s-modal) .rq-modal, .is-armed.s-done .rq-modal { visibility: hidden; opacity: 0; transition: opacity 200ms ease, visibility 0s linear 200ms; }
.rq-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; width: min(430px, calc(100% - 28px)); padding: 12px 16px; border-radius: 16px; background: var(--white); box-shadow: 0 32px 64px rgba(16, 24, 40, 0.24); font-size: 11px; transition: transform 320ms var(--ease); }
.is-armed:not(.s-modal) .rq-card { transform: scale(0.94) translateY(10px); }
.rq-card-h { display: flex; align-items: center; justify-content: space-between; font-size: 14px; letter-spacing: -0.01em; }
.rq-card-h svg { width: 13px; height: 13px; color: var(--pw-muted); }
.rq-desc, .rq-hint { margin: 0; font-size: 10.5px; line-height: 1.4; color: var(--pw-body); }
.rq-sec { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px 8px; }
.rq-cap { grid-column: 1 / -1; font-size: 9.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pw-muted); }
.rq-f { grid-column: span 2; display: grid; gap: 3px; min-width: 0; }
.rq-f--wide { grid-column: span 4; }
.rq-f span { overflow: hidden; font-size: 9.5px; font-weight: 600; color: var(--pw-body); white-space: nowrap; text-overflow: ellipsis; }
.rq-f b { height: 26px; padding: 0 9px; overflow: hidden; border: 1px solid #DCDFE6; border-radius: 8px; font-size: 11px; font-weight: 500; line-height: 24px; white-space: nowrap; text-overflow: ellipsis; }
/* What the portal filled in for this client lights up as the window opens. */
.is-armed.s-modal .rq-f--ret b { animation: row-flash 1800ms ease 500ms; }
.rq-tot { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; padding-top: 7px; border-top: 1px solid var(--pw-line); color: var(--pw-body); font-variant-numeric: tabular-nums; }
.rq-tot b { min-width: 9ch; color: var(--pw-ink); font-weight: 500; text-align: right; }
.rq-tot .t { padding-top: 3px; color: var(--pw-ink); font-size: 12.5px; font-weight: 700; }
.rq-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 8px; border-top: 1px solid var(--pw-line); font-size: 11.5px; font-weight: 500; }

/* Facturas: the month's list while the SAT's invoices keep arriving (the rows and their flash are 06-app.css). */
.win--sx { --cols: 62px minmax(0, 1fr) 112px 18px; }

/* Inicio: greeting, month picker, three totals, six months of bars, the Blu card. */
.win--nx { min-height: 424px; }
.nx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nx-head > div:first-child { min-width: 0; }
.nx-hola { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
/* One sentence per line, so the month's name never changes how many lines there are. */
.nx-sub { margin: 2px 0 0; font-size: 11.5px; color: var(--pw-body); }
.nx-sub > span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nx-pick { display: flex; flex-shrink: 0; gap: 5px; }
/* As wide as the longest month it shows. */
.nx-pick .ap-month { justify-content: center; min-width: 114px; }
.nx-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.nx-kpi { display: grid; gap: 2px; min-width: 0; padding: 10px 12px 11px; border: 1px solid var(--pw-line); border-radius: 12px; }
.nx-kpi span { font-size: 11px; color: var(--pw-body); }
.nx-kpi b { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.nx-kpi small { overflow: hidden; font-size: 10px; color: var(--pw-muted); white-space: nowrap; text-overflow: ellipsis; }
.nx-chart-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.nx-lg { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--pw-body); }
.nx-lg span { width: 7px; height: 7px; border-radius: 50%; background: var(--pw-in); }
.nx-lg .out { margin-left: 6px; background: var(--pw-out); }
.nx-bars { display: flex; justify-content: space-around; height: 104px; margin-bottom: 12px; padding-top: 14px; }
.nx-m { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 3px; text-align: center; }
.nx-m small { font-size: 10.5px; color: var(--pw-muted); }
.nx-m.is-now small, .is-armed:not(.s-oct) .nx-m[data-prev] small { color: var(--pw-ink); font-weight: 700; }
.is-armed:not(.s-oct) .nx-m.is-now small { color: var(--pw-muted); font-weight: 400; }
.nx-b { display: flex; align-items: flex-end; gap: 4px; }
.nx-b > span { position: relative; width: 18px; border-radius: 4px 4px 2px 2px; background: var(--pw-in); transform-origin: bottom; transition: transform 700ms var(--ease); }
.nx-b > .out { background: var(--pw-out); }
.nx-b .in > span { position: absolute; bottom: 100%; left: 50%; margin-bottom: 2px; color: var(--pw-body); font-size: 9px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); }
.nx-m:nth-child(1) .in { height: 77%; } .nx-m:nth-child(1) .out { height: 44%; }
.nx-m:nth-child(2) .in { height: 87%; } .nx-m:nth-child(2) .out { height: 56%; }
.nx-m:nth-child(3) .in { height: 69%; } .nx-m:nth-child(3) .out { height: 41%; }
.nx-m:nth-child(4) .in { height: 100%; } .nx-m:nth-child(4) .out { height: 66%; }
.nx-m:nth-child(5) .in { height: 83%; } .nx-m:nth-child(5) .out { height: 53%; }
.nx-m:nth-child(6) .in { height: 92%; } .nx-m:nth-child(6) .out { height: 63%; }
.is-armed:not(.s-bars) .nx-b > span { transform: scaleY(0); transition: none; }
/* The month that is about to be opened has nothing to show yet. */
.is-armed:not(.s-oct) .nx-m.is-now .nx-b > span { transform: scaleY(0); }
.is-armed.s-oct .nx-kpi:last-child { animation: row-flash 1500ms ease 700ms; }
.nx-blu { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #DCE8F8; border-radius: 12px; background: #F3F8FF; }
.nx-blu-av { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #5B9CF0; box-shadow: inset 0 -6px 10px rgba(31, 95, 196, 0.5), 0 0 0 3px #DCE8F8; }
.nx-blu-t { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.nx-blu-t small { overflow: hidden; font-size: 10.5px; color: var(--pw-body); white-space: nowrap; text-overflow: ellipsis; }
.nx-blu-btn { flex-shrink: 0; padding: 7px 11px; border-radius: 9px; background: var(--pw-brand); color: var(--white); font-size: 11px; font-weight: 600; white-space: nowrap; }

/* Cotizaciones: an accepted row becomes Facturada; its detail slides in from the right. */
@media (min-width: 641px) { .win--qx, .win--ix { min-height: 372px; } }
.win--qx { --cols: 40px minmax(0, 1fr) 78px 68px 16px; }
.qx-date { display: block; }
.qx-cli { display: flex; align-items: center; gap: 9px; min-width: 0; }
.qx-av { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--pw-brand-soft); color: var(--pw-brand-dark); font-size: 11px; font-weight: 700; }
.qx-st { background: var(--pw-brand-soft); color: var(--pw-brand-dark); transition: background-color 300ms ease, color 300ms ease; }
.qx-st > span { display: none; }
.qx-st .c2 { display: inline; }
.qx-btn svg { width: 14px; height: 14px; stroke-width: 2.6; }
.is-armed .qx-st .c2 { display: none; }
.is-armed .qx-btn .b2 { visibility: hidden; }
.is-armed:not(.s-billed) .qx-st .c1, .is-armed.s-billed .qx-st .c2 { display: inline; }
.is-armed:not(.s-work) .qx-btn .b0, .is-armed.s-work:not(.s-billed) .qx-btn .b1, .is-armed.s-billed .qx-btn .b2 { visibility: visible; }
.is-armed:not(.s-billed) .qx-st { background: #EDF8F1; color: #0F7A38; }
.qx-btn { background: var(--pw-ok); }
.is-armed:not(.s-billed) .qx-btn { background: var(--pw-brand); }
.is-armed.s-work:not(.s-billed) .qx-btn { background: var(--pw-brand-dark); }
.qx-detail { position: absolute; z-index: 25; top: var(--app-inset); right: var(--app-inset); bottom: 0; display: grid; align-content: start; gap: 10px; width: min(264px, 80%); padding: 16px; border: 1px solid var(--pw-line); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--white); box-shadow: -24px 0 48px -24px rgba(16, 24, 40, 0.32); transition: transform 460ms var(--ease), opacity 240ms ease, visibility 0s; }
.is-armed:not(.s-open) .qx-detail { visibility: hidden; opacity: 0; transform: translateX(28px); transition: transform 460ms var(--ease), opacity 240ms ease, visibility 0s linear 460ms; }
.qx-detail-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.qx-detail-to { margin-top: -6px; font-size: 11px; color: var(--pw-body); }
.qx-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 11px; border-radius: 10px; background: var(--pw-soft); font-size: 11.5px; color: var(--pw-body); font-variant-numeric: tabular-nums; }
.qx-sum b { color: var(--pw-ink); text-align: right; }
.qx-link { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 7px 8px 7px 11px; border: 1px solid var(--pw-line); border-radius: 10px; font-size: 11px; color: var(--pw-body); }
.qx-link span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qx-link b { flex-shrink: 0; padding: 4px 8px; border-radius: 7px; background: var(--pw-soft); color: var(--pw-ink); font-size: 10.5px; }
.qx-pdf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qx-pdf span { padding: 7px 0; border: 1px solid var(--pw-line); border-radius: 10px; font-size: 11px; font-weight: 600; text-align: center; }
.qx-sum .t { padding-top: 6px; border-top: 1px dashed #DCDFE6; color: var(--pw-ink); font-size: 12.5px; font-weight: 700; }

/* Invoices: the drop zone takes a PDF and the invoice joins the list. */
.win--ix { --cols: 62px minmax(0, 1fr) 116px 18px; }
.ix-tot b { color: #0F7A38; }
.ix-drop { display: inline-grid; place-items: center; flex-shrink: 0; height: 28px; padding: 0 11px; border: 1px dashed #B9C2D3; border-radius: 9px; font-size: 11px; font-weight: 500; white-space: nowrap; transition: border-color 200ms ease, background-color 200ms ease; }
.ix-drop svg { width: 13px; height: 13px; color: var(--pw-brand); }
.ix-drop .d1::before { border-color: rgba(31, 95, 196, 0.25); border-top-color: var(--pw-brand-dark); }
.is-armed.s-over:not(.s-read) .ix-drop { border-color: var(--pw-brand); background: var(--pw-brand-soft); }
.is-armed.s-drop:not(.s-read) .ix-drop .d0 { visibility: hidden; }
.is-armed.s-drop:not(.s-read) .ix-drop .d1 { visibility: visible; }
.ix-file { position: absolute; z-index: 38; left: 0; top: 0; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 6px; border: 1px solid var(--pw-line); border-radius: 9px; background: var(--white); box-shadow: 0 10px 24px -8px rgba(16, 24, 40, 0.38); font-size: 11.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: transform 560ms var(--ease), opacity 200ms ease; }
.ix-file > span { padding: 3px 5px; border-radius: 5px; background: var(--pw-red); color: var(--white); font-size: 9px; font-weight: 700; }
.is-armed.s-drag:not(.s-drop) .ix-file { opacity: 1; }

@container (max-width: 519px) {
  /* The menu and its pickers come up as a sheet; the window keeps to the concept, its taxes and the totals. */
  .rq-fly { left: var(--app-inset); right: var(--app-inset); top: auto; bottom: 0; width: auto; border-radius: 18px 18px 0 0; box-shadow: 0 -24px 48px -24px rgba(16, 24, 40, 0.32); transform: translateY(24px); }
  /* The product's list opens upwards: under its field there is only the sheet's foot. */
  .rq-field--p .rq-res { top: auto; bottom: calc(100% + 4px); }
  .rq-menu { padding: 10px 10px 14px; }
  .rq-quick { padding: 14px 14px 16px; }
  .rq-card { width: calc(100% - 20px); padding: 12px 12px 10px; }
  .rq-desc, .rq-sec--to, .rq-foot > :nth-child(2) { display: none; }
  /* Twelve columns, so the two retentions get the room their figures need on the narrowest phones. */
  .rq-sec--what { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
  .rq-sec--what .rq-f { grid-column: span 3; }
  .rq-sec--what .rq-f--wide, .rq-sec--what .rq-f--wide + .rq-f { grid-column: span 6; }
  .rq-sec--what .rq-f--ret { grid-column: span 5; }
  .rq-sec--what .rq-f--ret + .rq-f--ret { grid-column: span 4; }
  .rq-f b { padding: 0 7px; }
  .nx-pick [data-next] { display: grid; }
  .nx-pick .ap-month { display: inline-flex; }
  .nx-sub { display: none; }
  .nx-head { flex-direction: row; align-items: center; }
  .nx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .nx-kpi:last-child { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; }
  .nx-kpi:last-child small { grid-column: 1; }
  .nx-kpi:last-child b { grid-row: 1 / span 2; grid-column: 2; }
  .nx-kpi b { font-size: 16px; }
  .nx-b { gap: 3px; }
  .nx-b > span { width: 13px; }
  .nx-blu-btn { display: none; }
  .qx-date, .win--ix .ap-cta { display: none; }
  .ap-row.qx-hot, .win--qx .ap-row { grid-template-columns: minmax(0, 1fr) auto; }
  .win--qx .ap-row .st { grid-row: 2; grid-column: 1; margin-left: 35px; }
  .win--qx .ap-tot { grid-row: 1; grid-column: 2; }
  .qx-detail { top: auto; left: var(--app-inset); width: auto; border-radius: 16px 16px 0 0; box-shadow: 0 -24px 48px -24px rgba(16, 24, 40, 0.32); }
  .is-armed:not(.s-open) .qx-detail { transform: translateY(28px); }
}
@container (max-width: 279px) {
  .nx-hola { font-size: 15px; }
  .nx-pick .ap-month { min-width: 102px; padding: 0 6px; font-size: 10.5px; }
}

/* Blu: the portal's chat panel (copilot.css) floating on its card. The log keeps its height and follows
   the conversation as it grows (landing-demos.js); unarmed it rests on its end, and without JS or with
   reduced motion the whole conversation shows. */
.bq-well { container-type: inline-size; display: grid; align-content: end; padding: 0 18px 18px; }
.bq { display: flex; flex-direction: column; justify-self: center; width: 100%; max-width: 460px; min-width: 0; overflow: hidden; border: 1px solid var(--pw-line); border-radius: 16px; background: var(--white); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 48px -28px rgba(16, 24, 40, 0.35); font-size: 13px; }
.bq svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bq-head { display: flex; align-items: center; gap: 4px; flex-shrink: 0; height: 46px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--pw-line); }
.bq-head b { margin-right: 4px; font-size: 15px; letter-spacing: -0.01em; }
.bq-beta { margin-right: auto; padding: 2px 6px; border-radius: 5px; background: var(--pw-brand-soft); color: var(--pw-brand-dark); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.bq-hb { display: grid; place-items: center; width: 26px; height: 26px; color: var(--pw-body); }
.bq-hb svg { width: 14px; height: 14px; }
.bq-log { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; height: 286px; padding: 14px 14px 8px; overflow: hidden; }
.bq-msg { justify-self: start; max-width: 88%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #F1F0F4; line-height: 1.45; }
/* A touch darker than the portal's blue, so white text clears 4.5:1 at this size. */
.bq-msg--me { justify-self: end; border-radius: 14px 14px 4px 14px; background: #2A6FDB; color: var(--white); }
/* While it plays, what has not been said yet is not there, and each line comes in as it is said. */
.is-armed [data-say]:not(.is-in) { display: none; }
.is-armed [data-say].is-in { animation: msg-in 320ms var(--ease) both; }
.bq-typing { justify-self: start; display: none; gap: 4px; padding: 13px; border-radius: 14px 14px 14px 4px; background: #F1F0F4; }
.is-armed .bq-typing.is-in { display: inline-flex; }
.bq-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--pw-muted); animation: dot 1s ease-in-out infinite; }
.bq-typing span:nth-child(2) { animation-delay: 150ms; }
.bq-typing span:nth-child(3) { animation-delay: 300ms; }
/* Confirm card, as copilot.js renders it ("Revisa antes de emitir"). Its last frame is the emitted one;
   the result takes exactly the room the two buttons had, so the card keeps its height. */
.bq-card { padding: 12px 13px; border: 1px solid #9AD4AE; border-radius: 14px; font-size: 12.5px; transition: border-color 300ms ease; }
.is-armed:not(.s-done) .bq-card { border-color: var(--pw-line); }
.bq-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 7px 0 0; font-variant-numeric: tabular-nums; }
.bq-card dt { color: var(--pw-body); }
.bq-card dd { margin: 0; font-weight: 500; text-align: right; }
.bq-card .is-total { margin-top: 3px; padding-top: 6px; border-top: 1px dashed #DCDFE6; color: var(--pw-ink); font-weight: 700; }
.bq-card-a { display: none; gap: 8px; margin-top: 11px; }
.is-armed:not(.s-done) .bq-card-a { display: flex; }
.bq-no { flex: 1; display: grid; place-items: center; height: 36px; border: 1px solid #DCDFE6; border-radius: 10px; color: var(--pw-body); font-weight: 600; white-space: nowrap; }
.bq-yes { flex: 1.5; min-height: 36px; padding: 0 10px; background: #2A6FDB; font-size: inherit; }
.bq-card .bq-done { display: flex; align-items: center; min-height: 36px; margin: 11px 0 0; color: var(--pw-ok); font-weight: 600; }
.is-armed:not(.s-done) .bq-done { display: none; }
.is-armed.s-done .bq-done { animation: msg-in 320ms var(--ease) both; }
.bq-form { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin: 0 14px; padding: 5px 5px 5px 13px; border: 1px solid #DCDFE6; border-radius: 12px; transition: border-color 200ms ease, box-shadow 200ms ease; }
.bq-input { flex: 1; min-width: 0; overflow: hidden; color: #8D94A3; white-space: nowrap; text-overflow: ellipsis; }
.bq-form.is-typing { border-color: var(--pw-brand); box-shadow: 0 0 0 3px rgba(47, 123, 233, 0.16); }
/* While a question is being written its end stays in view (landing-demos.js), so nothing is elided. */
.bq-form.is-typing .bq-input { color: var(--pw-ink); text-overflow: clip; }
.bq-send { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--pw-brand); color: var(--white); }
.bq-send svg { width: 14px; height: 14px; }
.bq-foot { flex-shrink: 0; margin: 0; padding: 8px 16px 12px; font-size: 10.5px; line-height: 1.4; color: var(--pw-body); text-align: center; text-wrap: balance; }

@media (max-width: 640px) {
  .win--rq { min-height: 470px; }
  .win--nx { min-height: 396px; }
  .win--qx { min-height: 356px; }
  .bq-well { padding: 0 12px 12px; }
  .bq-log { height: 252px; }
}
/* The narrowest phones: the card's two buttons need every pixel to stay inside it. */
@container (max-width: 330px) {
  .bq-log { padding-inline: 10px; }
  .bq-card { padding-inline: 10px; }
  .bq-card-a { gap: 6px; }
  .bq-no, .bq-yes { font-size: 11.5px; }
  .bq-yes { padding: 0 6px; }
  .bq-yes > span { gap: 5px; }
  .bq-yes .b1::before { width: 9px; height: 9px; }
}
/* Under 560px the quick invoice is in its phone layout, whose window is shorter. */
@media (max-width: 559px) { .win--rq { min-height: 420px; } }
/* Without JS nothing rests the log on its end, so the whole conversation shows instead. */
html:not(.js) .bq-log { height: auto; gap: 14px; }
