/* site.css — web pública (inicio, cotizar, acceso) */

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 72px); }
.section { padding-top: clamp(80px, 10vw, 150px); }

/* Tipografía de marketing: ancha y pesada, como el logotipo */
.display { font-size: clamp(44px, 7vw, 104px); line-height: .98; font-weight: 800; font-stretch: 118%; letter-spacing: -.035em; max-width: 12.5em; }
.display-sm { font-size: clamp(40px, 5.6vw, 84px); line-height: 1; font-weight: 800; font-stretch: 118%; letter-spacing: -.035em; }
.h-section { font-size: clamp(32px, 4.2vw, 58px); line-height: 1.04; font-weight: 750; font-stretch: 112%; letter-spacing: -.03em; max-width: 16em; }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: #474747; max-width: 34em; }
.lead-sm { font-size: 18px; color: #474747; max-width: 32em; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.site-logo img { height: 26px; width: auto; }
.site-nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; padding: 10px 0; color: var(--text); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--brand); }
.site-nav-portal { display: none; }
.site-header-cta { display: flex; align-items: center; gap: 6px; }
.site-menu-btn { display: none; }

/* Hero */
.hero { padding-top: clamp(48px, 7vw, 104px); }
.hero-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 72px; }
.hero-top .display { flex: 1 1 620px; }
.hero-side { flex: 0 1 380px; display: flex; flex-direction: column; gap: 28px; }
.hero-media { margin-top: clamp(40px, 6vw, 72px); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); aspect-ratio: 16 / 7; min-height: 300px; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }

/* Clientes */
.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 48px; padding-top: 48px; }
.clients-label { font-size: 14px; color: var(--muted); }
.clients ul { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 48px; margin: 0; padding: 0; list-style: none; font-weight: 700; font-stretch: 110%; font-size: 19px; color: #9A9A96; letter-spacing: -.01em; }
.client-logo { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; transition: color .2s; }
.client-logo:hover { color: var(--ink); }
.client-logo img { height: 44px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .25s, opacity .25s; }
.client-logo:hover img { filter: none; opacity: 1; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 40px 32px; }
.stats div { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.stats strong { font-size: clamp(46px, 5vw, 72px); line-height: 1; font-weight: 800; font-stretch: 118%; letter-spacing: -.04em; color: var(--ink); }
.stats span { color: var(--muted); }

/* Encabezado de sección */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 80px; margin-bottom: 56px; }
.section-head > div:first-child { flex: 1 1 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; flex: 0 1 420px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 500; }
.chips-line li { background: transparent; border: 1px solid var(--line); font-size: 14px; }

/* Servicios */
.services { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service summary { list-style: none; display: flex; align-items: center; gap: 24px; min-height: 100px; padding: 20px 0; cursor: pointer; }
.service summary::-webkit-details-marker { display: none; }
.service-n { flex: none; width: 56px; font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.service-t { flex: 1; font-size: clamp(22px, 2.6vw, 36px); font-weight: 650; font-stretch: 108%; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); }
.service-plus { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); transition: transform .25s, background .2s, border-color .2s; }
.service summary:hover .service-plus { border-color: var(--ink); }
.service[open] .service-plus { transform: rotate(45deg); background: var(--ink); border-color: var(--ink); color: #fff; }
.service-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 64px; padding: 0 0 40px 80px; }
.service-body > .stack { flex: 1 1 340px; }
/* Dentro de la columna, las etiquetas no deben heredar la base de 420px (las convertía en óvalos altos) */
.service-body .chips { flex: none; }
.service-media { flex: 0 1 420px; width: 420px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; background: var(--surface); }

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border-radius: var(--r-lg); padding: 30px; min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.steps h3 { font-size: 23px; font-stretch: 104%; margin-bottom: 10px; }
.steps p { color: #4A4A4A; font-size: 16px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); font-weight: 700; font-size: 15px; }
.steps li:first-child .step-n { background: var(--brand); }

/* Antes / después */
.ba-control { flex: 0 1 340px; display: flex; flex-direction: column; gap: 8px; }
.ba-control input { width: 100%; accent-color: var(--ink); min-height: 44px; }
.ba { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); user-select: none; touch-action: pan-y; cursor: ew-resize; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba-line > span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 2px; padding: 0 10px; height: 52px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.ba-tag { position: absolute; top: 20px; padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.ba-tag-l { left: 20px; } .ba-tag-r { right: 20px; }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 56px 24px; }
.project { all: unset; position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 18px; border-radius: var(--r-lg); }
.project-count { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: 13px; font-weight: 600; color: var(--ink); }
.project:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.project img, .project-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); background: var(--surface); transition: transform .35s ease; }
.project:hover img { transform: scale(1.012); }
.project-noimg { display: flex; align-items: flex-end; padding: 28px; font-size: clamp(28px, 3vw, 40px); font-weight: 800; font-stretch: 118%; letter-spacing: -.03em; color: #C9C9C4; }
.project-meta { display: flex; flex-direction: column; gap: 2px; }
.project-meta strong { font-size: 21px; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
.project-meta span { color: var(--muted); font-size: 15px; }
.project-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; padding: 24px; }
.project-detail img { width: 100%; border-radius: var(--r); aspect-ratio: 1; object-fit: cover; }

/* Galería del proyecto */
.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery-main { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface); aspect-ratio: 1; }
.gallery-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .3s ease; }
.gallery-slide.is-on { opacity: 1; z-index: 1; }
.gallery-slide img { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
.gallery-slide figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .92); font-size: 13.5px; }
.gallery-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.gallery-nav:hover { background: #fff; }
.gallery-prev { left: 10px; } .gallery-next { right: 10px; }
.gallery-count { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.gallery-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; opacity: .65; transition: opacity .15s, border-color .15s; }
.gallery-thumbs button.is-on, .gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.is-on { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* Testimonios */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 56px 80px; }
.quotes figure { margin: 0; padding-top: 32px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 28px; }
.quotes blockquote { margin: 0; font-size: clamp(21px, 2.1vw, 27px); line-height: 1.38; font-weight: 500; letter-spacing: -.015em; color: var(--ink); }
.quotes figcaption { display: flex; flex-direction: column; font-size: 15px; }
.quotes figcaption span { color: var(--muted); }

/* FAQ */
.faq-wrap { display: flex; flex-wrap: wrap; gap: 48px 80px; }
.faq-wrap > div:first-child { flex: 1 1 320px; }
.faq { flex: 2 1 600px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 80px; padding: 18px 0; cursor: pointer; font-size: 19px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .25s; }
.faq details[open] summary .ico { transform: rotate(45deg); }
.faq details p { padding: 0 56px 26px 0; color: #474747; max-width: 42em; }

/* CTA */
.cta { background: var(--surface); border-radius: var(--r-xl); padding: clamp(36px, 7vw, 96px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px 80px; }
.cta > .stack { flex: 1 1 520px; }

/* Pie */
.site-footer { margin-top: clamp(80px, 10vw, 150px); padding: 64px 0 36px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 40px; }
.footer-grid img { height: 24px; width: auto; }
/* El logo vive dentro de una columna flex: sin esto se estira a todo el ancho */
.footer-brand .footer-logo { align-self: flex-start; width: auto; height: 24px; max-width: 100%; object-fit: contain; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; font-style: normal; }
.footer-col h2 { font-size: 13px; font-weight: 600; color: var(--muted); font-stretch: 100%; letter-spacing: 0; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--ink); text-decoration: underline; }
.footer-credit { margin-top: 18px; font-size: 13px; color: var(--soft); }
.footer-credit a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.footer-credit .heart { color: var(--brand); }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.wa-float-up { bottom: 88px; width: 48px; height: 48px; right: 24px; }

/* Cotizar */
.quote-page { display: flex; flex-wrap: wrap; gap: 56px 96px; align-items: flex-start; padding-top: clamp(48px, 7vw, 104px); }
.quote-intro { flex: 1 1 340px; display: flex; flex-direction: column; gap: 22px; }
.quote-facts { list-style: none; margin: 8px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; color: #474747; font-size: 15px; }
.quote-facts li { display: flex; align-items: center; gap: 10px; }
.quote-card { flex: 1.4 1 540px; background: var(--surface); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.quote-form { display: flex; flex-direction: column; gap: 32px; }
.hp { position: absolute; left: -9999px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.stepper li { display: flex; flex-direction: column; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ''; height: 4px; border-radius: 999px; background: var(--line-2); }
.stepper li.is-on { color: var(--ink); }
.stepper li.is-on::before, .stepper li.is-done::before { background: var(--ink); }
.step { border: 0; margin: 0; padding: 0; display: none; flex-direction: column; gap: 24px; min-width: 0; }
.step.is-on { display: flex; }
.no-js .step { display: flex; }
.step legend { padding: 0; margin-bottom: 24px; font-size: 26px; font-weight: 700; font-stretch: 106%; letter-spacing: -.02em; color: var(--ink); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; flex-direction: column; gap: 6px; min-height: 104px; padding: 20px 22px; background: var(--paper); border: 2px solid var(--paper); border-radius: 18px; transition: border-color .15s; }
.choice small { color: var(--muted); font-size: 14px; }
.choice:hover span { border-color: var(--line-2); }
.choice input:checked + span { border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.quote-card .input, .quote-card .select, .quote-card .textarea { border-color: var(--line-2); }
.quote-done { display: flex; flex-direction: column; gap: 20px; padding: 8px 0; }
.done-ico { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; align-items: center; justify-content: center; }

/* Textos legales */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px 80px; padding-top: clamp(48px, 7vw, 104px); align-items: start; }
.legal-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 4px; }
.legal-nav a { padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 500; }
.legal-nav a:hover { color: var(--ink); background: var(--surface); }
.legal-nav a.is-active { color: var(--ink); background: var(--surface); font-weight: 600; }
.legal-body { max-width: 44em; }
.legal-body h1 { margin-bottom: 32px; }
.legal-body h2 { font-size: 22px; margin: 40px 0 12px; font-stretch: 104%; }
.legal-body p, .legal-body li { color: #3D3D3D; font-size: 17px; line-height: 1.65; }
.legal-body p + p { margin-top: 14px; }
.legal-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Acceso */
.access { padding-top: clamp(48px, 7vw, 104px); display: flex; flex-direction: column; gap: 40px; min-height: 60vh; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.access-card { display: flex; flex-direction: column; gap: 14px; padding: 36px; border-radius: var(--r-xl); background: var(--surface); text-decoration: none; border: 2px solid var(--surface); transition: border-color .15s; }
.access-card:hover { border-color: var(--ink); }
.access-card h2 { font-size: 28px; font-stretch: 112%; }
.access-card p { color: #474747; max-width: 30em; }
.access-ico { display: inline-flex; width: 48px; height: 48px; border-radius: 50%; background: var(--paper); align-items: center; justify-content: center; }
.access-card:first-child .access-ico { background: var(--brand); }
.access-go { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* Móvil */
@media (max-width: 980px) {
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px clamp(20px, 5vw, 72px) 20px; background: #fff; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-nav-portal { display: block; }
  .site-menu-btn { display: inline-flex; }
  .hide-sm { display: none; }
}
@media (max-width: 720px) {
  .service-body { padding-left: 0; }
  .service-media { width: 100%; flex-basis: 100%; }
  .service-n { width: 32px; }
  .hero-media { aspect-ratio: 4 / 3; }
  .ba { aspect-ratio: 4 / 3; }
  .project-detail { grid-template-columns: 1fr; }
  .projects, .quotes { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ───── Asistente virtual ───── */
.bot { position: fixed; right: 20px; bottom: 20px; z-index: 70; }
.bot-launcher { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .2s; }
.bot-launcher:hover { transform: scale(1.05); }
.bot-launcher::after { content: ''; position: absolute; top: 4px; right: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.bot.is-open .bot-launcher::after { display: none; }
.bot-ico-close { display: none; }
.bot.is-open .bot-ico-open { display: none; }
.bot.is-open .bot-ico-close { display: inline-flex; }
.bot-launcher-ico { display: inline-flex; }

.bot-teaser { position: absolute; right: 0; bottom: 74px; width: max-content; max-width: 260px; display: flex; align-items: flex-start; gap: 4px; padding: 6px 6px 6px 4px; border-radius: 18px 18px 4px 18px; background: #fff; box-shadow: 0 10px 34px rgba(0, 0, 0, .16); animation: bot-in .35s ease both; }
.bot-teaser-txt { all: unset; cursor: pointer; padding: 8px 10px 8px 4px; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.bot-teaser-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; }

.bot-panel { position: absolute; right: 0; bottom: 74px; width: min(390px, calc(100vw - 40px)); height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .24); animation: bot-in .25s ease both; }
@keyframes bot-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.bot-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line); }
.bot-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: var(--surface); padding: 5px; }
.bot-head h2 { font-size: 16px; font-stretch: 104%; letter-spacing: -.01em; }
.bot-head p { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.bot-online { width: 7px; height: 7px; border-radius: 50%; background: #1DB954; }
.bot-head-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.bot-head-btn:hover { background: var(--surface); color: var(--ink); }
.bot-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--line); }
.bot-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .35s ease; }

.bot-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; overscroll-behavior: contain; }
.bot-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; animation: bot-in .2s ease both; }
.bot-them { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 6px; }
.bot-them small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.bot-them.is-error { background: #FDECEC; color: #8F1D16; }
.bot-me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bot-link { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bot-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.bot-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); animation: bot-dot 1s infinite ease-in-out; }
.bot-typing span:nth-child(2) { animation-delay: .15s; }
.bot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bot-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.bot-summary { align-self: stretch; max-width: none; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; }
.bot-summary > strong { display: block; margin-bottom: 8px; font-size: 14px; }
.bot-summary dl { margin: 0; display: grid; gap: 2px 0; font-size: 14px; }
.bot-summary dt { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.bot-summary dd { margin: 0; color: var(--ink); font-weight: 500; }

.bot-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bot-card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.bot-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface); margin-bottom: 4px; }
.bot-card strong { font-size: 14px; line-height: 1.2; }
.bot-card span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }

.bot-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 10px; max-height: 42%; overflow-y: auto; }
.bot-actions:empty { display: none; }
.bot-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.25; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.bot-chip:hover { border-color: var(--ink); }
.bot-chip.is-primary { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.bot-chip.is-ghost { border-color: transparent; color: var(--muted); }
.bot-chip.is-ghost:hover { color: var(--ink); background: var(--surface); }
.bot-chip.is-on { background: var(--brand-soft); border-color: var(--brand); }
.bot-chip[disabled] { opacity: .45; cursor: default; }
.bot-actions.is-multi .bot-chip:not(.is-primary):not(.is-ghost)::before { content: ''; width: 14px; height: 14px; margin-right: 8px; border: 1.5px solid var(--line-2); border-radius: 4px; flex: none; }
.bot-actions.is-multi .bot-chip.is-on::before { background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: var(--brand); }

.bot-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.bot-input input, .bot-input textarea { flex: 1; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 22px; background: #fff; font-size: 16px; resize: none; }
.bot-input textarea { border-radius: 16px; line-height: 1.4; }
.bot-input input:focus, .bot-input textarea:focus { outline: none; border-color: var(--ink); }
.bot-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--brand); color: #000; cursor: pointer; }
.bot-send:hover { background: #E07200; }

@media (max-width: 720px) {
  .bot { right: 16px; bottom: 16px; }
  .bot-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; padding-bottom: env(safe-area-inset-bottom, 0); }
  .bot.is-open .bot-launcher { display: none; }
  .bot-teaser { right: 0; }
  .wa-float-up { bottom: 84px; right: 22px; }
}
@media print { .bot, .wa-float { display: none !important; } }
