:root {
  color-scheme:light;
  --paper:#f8f9f7; --white:#fff; --graphite:#1f2523; --ink:#202624; --muted:#626c66;
  --line:#e2e7e3; --red:#c12b1e; --red-hover:#a72218; --pale:#fcece8;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--ink); background:var(--paper); font-size:16px; line-height:1.45;
  -webkit-text-size-adjust:100%; text-size-adjust:100%;
}
* {box-sizing:border-box}
html,body {margin:0; min-width:0}
body {height:100vh; height:100dvh; display:flex; flex-direction:column; overflow:hidden}
button,input,textarea {font:inherit; color:inherit}
button,a,input,textarea {touch-action:manipulation; -webkit-tap-highlight-color:transparent}
button {border:0; background:transparent; cursor:pointer}
button:disabled {cursor:wait}
button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible {outline:3px solid #245ea8; outline-offset:3px}
a {color:var(--red); text-decoration:none}
a:hover {text-decoration:underline}
h1,h2,p {margin:0}
svg {display:inline-block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none}
[hidden] {display:none!important}
.sr-only {position:absolute; width:1px; height:1px; padding:0; margin:-1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; border:0}
.topbar {height:calc(65px + env(safe-area-inset-top)); padding:env(safe-area-inset-top) max(19px,env(safe-area-inset-right)) 0 max(22px,env(safe-area-inset-left)); display:flex; flex:none; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); background:var(--paper)}
.brand,.top-actions {display:flex; align-items:center}
.brand img {display:block; width:94px; height:auto}
.brand span {display:none}
.top-actions {gap:10px}
.source-tag {font-size:.73rem; font-weight:600; letter-spacing:.025em; color:#536157; border:1px solid var(--line); border-radius:7px; padding:3px 8px; background:#f1f3f0}
.icon-button {width:44px; height:44px; display:inline-grid; place-items:center; border-radius:12px}
.icon-button svg {width:24px; height:24px}
.icon-button:hover,.agents-button:hover {background:#edf0ec}
.workspace {flex:1; display:flex; min-height:0; width:100%; margin:0 auto}
.sidebar {display:none}
.chat {flex:1; min-width:0; min-height:0; display:flex; flex-direction:column}
.chat-scroll {flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#c9ceca transparent; scroll-padding:15px}
.chat-inner {width:100%; max-width:800px; margin:auto; padding:19px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
.page-title {display:flex; justify-content:space-between; align-items:center; gap:8px; padding:0 2px; margin:0 0 20px}
.page-title h1 {font-size:1.8rem; line-height:1.18; letter-spacing:-.045em; font-weight:680}
.page-title p {font-size:.94rem; margin-top:4px; color:var(--muted)}
.agents-button {min-height:44px; border-radius:10px; padding:0 7px; display:flex; align-items:center; gap:5px; color:#4a5650; font-size:.84rem; font-weight:550}
.agents-button svg {width:17px; height:17px}
.date-divider {display:flex; align-items:center; gap:13px; color:var(--muted); font-weight:500; font-size:.88rem; margin:16px 2px}
.date-divider::before,.date-divider::after {content:""; height:1px; background:#d7ddd8; flex:1}
.turn {margin:0 0 20px; scroll-margin:15px}
.bubble {background:var(--white); border:1px solid #e8ebe7; border-radius:17px; box-shadow:0 2px 5px #1f252303; overflow-wrap:anywhere}
.question {width:fit-content; max-width:84%; font-size:1.04rem; line-height:1.42; margin-left:auto; padding:12px 14px 8px; white-space:pre-wrap}
.question time {display:block; margin-top:6px; font-size:.73rem; color:var(--muted); text-align:right}
.reply {width:fit-content; min-width:min(76%,290px); max-width:95%; margin-top:15px; padding:15px; font-size:1rem}
.agent-byline {display:flex; align-items:center; gap:9px; line-height:1.24; font-size:.88rem; font-weight:650}
.agent-byline time {display:block; margin-top:3px; color:var(--muted); font-size:.73rem; font-weight:400}
.avatar {position:relative; width:37px; height:37px; display:grid; place-items:center; background:var(--pale); border-radius:50%; flex:none}
.avatar::before {content:""; width:21px; height:25px; background:url("/assets/movil-logo.webp") 0 center/64px auto no-repeat}
.answer-text {white-space:pre-line; margin:13px 0 0; font-size:1rem; line-height:1.48; letter-spacing:-.012em}
.stock-headline {font-weight:550; font-size:1.48rem; line-height:1.18; letter-spacing:-.035em; margin:15px 0 6px}
.stock-headline strong {font-size:2rem; font-variant-numeric:tabular-nums; letter-spacing:-.045em; font-weight:700}
.stock-detail {font-size:.88rem; color:var(--muted)}
.stock-notice {font-size:.94rem; margin:9px 0 0; color:#75541b}
.facts {display:grid; margin:14px 0 0; padding:0; border-top:1px solid var(--line)}
.fact-line {display:grid; grid-template-columns:minmax(0,1fr) fit-content(58%); gap:12px; align-items:baseline; border-bottom:1px solid var(--line); padding:8px 0; line-height:1.4; font-size:.93rem}
.fact-line dd {margin:0; font-weight:650; font-variant-numeric:tabular-nums; text-align:right; word-break:break-word}
.source {margin:10px 0 0; color:var(--muted); font-size:.79rem; line-height:1.45}
.private-source time {display:block; margin-top:2px}
.report-link {display:inline-flex; align-items:center; min-height:44px; font-size:.88rem; font-weight:550}
.source-details {margin:2px 0 0}
.source-details summary {min-height:44px; display:flex; align-items:center; gap:5px; width:fit-content; cursor:pointer; list-style:none; border-radius:5px}
.source-details summary::-webkit-details-marker {display:none}
.source-details summary:focus-visible {outline:3px solid #245ea8; outline-offset:2px}
.source-details summary svg {width:14px; height:14px}
.source-details[open] summary svg {transform:rotate(180deg)}
.source-details p {margin:0 0 6px}
.source-details + .follow-ups {margin-top:-4px}
.follow-ups {display:flex; flex-wrap:wrap; gap:0 12px; margin-top:5px}
.follow {padding:6px 0; min-height:44px; font-size:.9rem; font-weight:600; color:var(--red); text-align:left; display:inline-flex; align-items:center; gap:5px}
.follow svg,.starter-option svg {width:17px; height:17px}
.follow:hover,.older:hover,.panel-link:hover {text-decoration:underline}
.starter {background:var(--white); border:1px solid var(--line); border-radius:17px; padding:18px; max-width:530px}
.starter h2 {font-size:1.36rem; line-height:1.22; font-weight:650; letter-spacing:-.03em; margin:15px 0}
.starter-option {width:100%; min-height:48px; display:flex; justify-content:space-between; align-items:center; text-align:left; gap:10px; padding:9px 0; border-top:1px solid var(--line); font-size:.94rem; font-weight:500}
.starter-option:hover {color:var(--red)}
.starter-option svg {color:var(--red)}
.older {display:block; margin:0 auto 10px; font-size:.85rem; padding:8px 12px; min-height:44px; color:var(--muted)}
.composer-wrap {flex:none; width:100%; max-width:800px; margin:0 auto; padding:10px max(15px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(15px,env(safe-area-inset-left)); background:var(--paper)}
.composer {display:flex; gap:8px; align-items:flex-end; padding:7px; background:var(--white); border:1px solid #c6cdc8; border-radius:18px; box-shadow:0 1px 3px #1f252304}
.composer:focus-within {border-color:#8b9890}
.composer textarea {min-width:0; display:block; flex:1; align-self:center; resize:none; background:transparent; border:0; outline:0; padding:6px 6px 6px 9px; font-size:1rem; line-height:1.45; max-height:7em; field-sizing:content}
.composer textarea:focus-visible {outline:none}
.composer textarea::placeholder {color:#707873}
.send,.primary {color:#fff; background:var(--red); font-weight:650}
.send {display:grid; place-items:center; min-width:44px; min-height:44px; border-radius:12px}
.send svg {width:23px; height:23px; transform:rotate(-90deg); stroke-width:2.2}
.send:hover,.primary:hover {background:var(--red-hover)}
.send:disabled {opacity:.65}
.feedback {font-size:.86rem; color:#76291f; margin:0 0 8px 3px}
.pending {font-size:.9rem; color:var(--muted); margin:12px 0}
.gate {flex:1; overflow:auto; width:100%; display:grid; place-items:center; padding:24px}
.gate-card {background:var(--white); border:1px solid var(--line); border-radius:20px; width:100%; max-width:390px; padding:28px}
.gate-logo {display:block; width:95px; height:auto; margin-bottom:26px}
.gate-card h1 {font-size:1.6rem; line-height:1.15; letter-spacing:-.035em}
.gate-card p {font-size:.95rem; color:var(--muted); margin:9px 0 0}
.gate form {margin-top:20px; display:grid; gap:8px}
.gate label {font-size:.87rem; font-weight:600}
.gate input {width:100%; min-height:47px; border-radius:10px; border:1px solid #9ba69f; padding:8px 12px}
.primary {min-height:46px; border-radius:10px; padding:8px 16px; margin-top:8px}
.panel-link {display:inline-block; margin:12px 0 0; font-size:.9rem}
dialog {border:1px solid var(--line); border-radius:20px; width:min(440px,calc(100% - 28px)); max-height:min(74dvh,600px); padding:0; color:var(--ink); background:var(--white); box-shadow:0 18px 60px #17241e30}
dialog::backdrop {background:#17221b55}
.sheet-heading {position:sticky; top:0; display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--line); background:var(--white); padding:12px 12px 12px 19px; z-index:1}
.sheet-heading h2 {font-size:1.2rem; font-weight:650}
#sheet-body {padding:6px 14px 12px}
.rail-item,.sheet-row {width:100%; text-align:left; min-height:46px; display:flex; align-items:center; gap:11px; padding:10px 9px; border-radius:9px; line-height:1.35}
.rail-item {color:var(--ink); font-size:.92rem}
.rail-item:hover,.sheet-row:hover {background:#eff2ee; text-decoration:none}
.rail-item svg {color:#535e57}
.sheet-row {border-bottom:1px solid var(--line); border-radius:0; font-size:.96rem}
.sheet-row span {flex:1; overflow-wrap:anywhere}
.sheet-row small {display:block; color:var(--muted); font-size:.77rem; margin-top:3px}
.sheet-row svg:last-child {width:16px; height:16px; color:var(--muted)}
.sheet-note {font-size:.94rem; color:var(--muted); padding:12px 7px}
.sheet-panel {margin-top:8px; border-top:1px solid var(--line); padding-top:5px}
@media (min-width:760px) {
  .topbar {height:74px; padding-left:max(32px,calc((100vw - 1220px)/2 + 24px)); padding-right:max(32px,calc((100vw - 1220px)/2 + 24px))}
  .brand img {width:110px}
  .brand span {display:block; border-left:1px solid #ccd3cc; margin-left:20px; padding-left:20px; color:#4f5b54; font-size:.94rem; font-weight:550}
  .workspace {max-width:1220px}
  .sidebar {display:flex; flex-direction:column; justify-content:space-between; width:217px; flex:none; border-right:1px solid var(--line); padding:30px 15px 18px}
  .rail-title {font-size:.79rem; color:var(--muted); margin:0 9px 8px; font-weight:600}
  .sidebar-bottom {border-top:1px solid var(--line); padding-top:12px}
  .agents-button {display:none}
  .chat-inner {padding:30px 35px 14px}
  .page-title h1 {font-size:2rem}
  .page-title {margin-bottom:24px}
  .reply {max-width:88%; padding:18px 20px}
  .composer-wrap {padding:14px 35px 24px}
  .question {max-width:75%}
}
@media (max-width:420px) {
  dialog {margin:auto auto max(10px,env(safe-area-inset-bottom)); width:calc(100% - 18px)}
}
@media (max-height:500px) {
  .topbar {height:48px}
  .brand img {width:75px}
  .composer-wrap {padding-top:5px; padding-bottom:6px}
  .gate {align-items:start}
}
