/* Asisto, prototipos de pantallas. Todo valor visual sale de los tokens de la marca.
   Los componentes (botón, estado, cita, pliegue, lista de acciones, opciones, tarjeta de propuesta, avisos)
   viven en componentes.css; aquí solo se arman las pantallas con ellos: contenedores, orden y márgenes. */
@import url("../template/packages/brand/tokens.css");
@import url("componentes.css");
@import url("compromisos.css");
@import url("conexiones.css");
@import url("reuniones.css");
@import url("chat_estados.css");
@import url("preferencias.css");
@import url("por_definir.css");
@import url("briefs.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--surface-2); color: var(--text); }
body { margin: 0; font: 400 16px/24px var(--font-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--highlighter); color: var(--ink-900); }
[data-theme="dark"] ::selection { background: var(--dot-500); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) ::selection { background: var(--dot-500); } }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wordmark { height: 22px; width: auto; display: block; }
.wordmark.inverse { display: none; }
:root[data-theme="dark"] .wordmark.regular { display: none; }
:root[data-theme="dark"] .wordmark.inverse { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark.regular { display: none; }
  :root:not([data-theme="light"]) .wordmark.inverse { display: block; }
}

/* ---------- Teléfono ---------- */
.phone {
  width: 360px; height: 760px; display: flex; flex-direction: column; position: relative;
  background: var(--background); border-radius: var(--r-lg); overflow: clip; /* clip: el marco no se desplaza al saltar a un #ancla */
  box-shadow: 0 1px 2px rgb(16 32 27 / 0.06), 0 12px 32px -8px rgb(16 32 27 / 0.18); outline: 1px solid var(--border);
}
.statusbar {
  display: flex; justify-content: space-between; padding: 10px 20px 4px;
  font: 500 13px/16px var(--font-mono); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.app-bar { display: flex; align-items: center; justify-content: space-between; height: 44px; }
button.avatar {
  width: 44px; height: 44px; margin-right: -6px; cursor: pointer;
  background: radial-gradient(circle 16px at center, var(--surface-2) 15.5px, transparent 16px);
}
.screen { flex: 1; overflow-y: auto; padding: 8px 16px 12px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
/* Cuatro pestañas en el teléfono, del mismo ancho: Hoy, Compromisos, Chat y "Más" (un botón que abre la hoja). */
.tabbar { display: flex; border-top: 1px solid var(--border); background: var(--surface); padding: 6px 4px 10px; }
.tabbar a, .tabbar .tab-more {
  flex: 1 1 0; min-width: 48px; display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 48px; white-space: nowrap;
  border: 0; background: none; color: var(--text-3); text-decoration: none; font: 500 13px/16px var(--font-ui); border-radius: var(--r-sm); cursor: pointer;
}
.tabbar a[aria-current="page"], .tabbar .tab-more[aria-current="page"], .tabbar .tab-more[aria-expanded="true"] { color: var(--text); font-weight: 600; }
.tabbar .tab-more:focus-visible { outline: 2px solid var(--focus, var(--text)); outline-offset: -2px; }

/* Barra fija del detalle: la acción principal se estira y "Más" queda a su ancho. */
.action-bar { display: flex; gap: 8px; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); }
.action-bar .btn.primary { flex: 1; }
.action-bar .btn.more { flex: none; padding: 0 16px; }
.action-bar .btn.primary { white-space: nowrap; padding: 0 12px; }
/* Sin pestañas (el detalle): la barra de acciones queda sola abajo, con aire para el pulgar. */
.phone.no-tabs .action-bar { padding-bottom: 20px; }
.action-bar + .tabbar { border-top: 0; padding-top: 0; }

/* Hoja que sube desde abajo */
.scrim { position: absolute; inset: 0; background: rgb(11 21 18 / 0.48); }
.sheet-layer { position: absolute; inset: 0; z-index: 4; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 16px 20px;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -8px 32px -8px rgb(11 21 18 / 0.35);
}
.sheet:focus { outline: none; }
.sheet .grabber { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 14px; }
.sheet h2 { font: 700 22px/28px var(--font-display); letter-spacing: -0.01em; }
.sheet .more-options { margin-top: 12px; background: var(--background); }
.sheet .more-options + .actions { margin-top: 8px; }
.sheet .sheet-actions { margin-top: 20px; }

/* ---------- Escritorio (1440 × 900) ---------- */
.desk { width: 100vw; height: 100vh; display: grid; grid-template-columns: 248px 460px 1fr; grid-template-rows: minmax(0, 1fr); background: var(--background); overflow: clip; position: relative; }
.desk.single { grid-template-columns: 248px 1fr; }
.desk > main.panes { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: minmax(0, 1fr); min-width: 0; min-height: 0; }
.rail { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.rail .wordmark { height: 24px; margin: 4px 10px 24px; }
.rail a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-md);
  color: var(--text-2); text-decoration: none; font: 500 15px/20px var(--font-ui);
}
.rail a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.rail .spacer { flex: 1; }
.rail .avatar { width: 28px; height: 28px; flex: none; }
.pane { overflow-y: auto; padding: 32px 36px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.pane.list { border-right: 1px solid var(--border); padding: 40px 56px; }
.pane.list > * { max-width: 760px; }
/* Una lista sin detalle al lado (Compromisos sin uno abierto) va sola, a lo ancho, centrada para leer. */
.desk > main.panes:has(> .pane.list:only-child) { grid-template-columns: minmax(0, 1fr); }
.pane.list:only-child { border-right: 0; }
.pane.list:only-child > * { margin-inline: auto; }
.pane.detail { position: relative; background: var(--surface); padding: 36px 32px 40px; }
.desk .empty-panel { display: grid; place-items: center; height: 100%; color: var(--text-3); font-size: 15px; text-align: center; }

/* Escritorio sin conexión: el aviso en su propia fila, sobre la lista y el detalle */
.desk.with-banner { grid-template-rows: auto minmax(0, 1fr); }
.desk.with-banner .rail { grid-row: 1 / 3; }
.desk.with-banner > .offline { grid-column: 2 / -1; grid-row: 1; padding: 12px 36px; }
.desk.with-banner > main.panes, .desk.with-banner > .chat-pane { grid-row: 2; }

/* Diálogo de escritorio */
.dialog-scrim { position: absolute; inset: 0; z-index: 3; background: rgb(11 21 18 / 0.48); }
.dialog {
  position: absolute; z-index: 4; top: 50%; left: 50%; width: 560px; transform: translate(-50%, -50%);
  padding: 28px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 24px 64px -16px rgb(11 21 18 / 0.45);
}
.dialog h2 { font: 700 24px/30px var(--font-display); letter-spacing: -0.01em; }
.dialog .dialog-actions { margin-top: 24px; }

/* ---------- Hoy ---------- */
.greeting { margin-top: 8px; }
.greeting h1 { font: 700 28px/34px var(--font-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.greeting p { margin-top: 4px; font: 400 14px/20px var(--font-ui); color: var(--text-2); }
.brief-lead { margin-top: 6px; font: 400 15px/22px var(--font-ui); color: var(--text-2); }

.next-meeting {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: 10px;
  padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none;
}
.next-meeting .ico { flex: none; color: var(--text-3); }
.next-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.next-label { font: 400 13px/18px var(--font-ui); color: var(--text-2); }
.next-main strong { font: 600 15px/22px var(--font-ui); }
.next-pending { font: 500 13px/18px var(--font-ui); color: var(--text-2); }

.brief-section { margin-top: 28px; }
.items { list-style: none; margin: 0; padding: 0; }
.more-link { justify-content: flex-start; }
.section-link {
  display: flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px;
  color: var(--text); font: 600 14px/18px var(--font-ui); text-decoration: none; border-radius: var(--r-sm);
}

/* Lo primero del día, completo: su rótulo, la frase, el estado, la cita y una acción. Sin el Punto (decisión del 08/10/2026). */
.item { position: relative; padding: 18px 0; }
.item + .item { border-top: 1px solid var(--border); }
.brief-section .item:first-child { padding: 10px 0 12px; }
.item > .body { min-width: 0; }
.first-label { font: 600 14px/20px var(--font-ui); color: var(--text); }
.item .headline {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 2px;
  font: 600 17px/24px var(--font-ui); color: var(--text); text-decoration: none; text-wrap: pretty; overflow-wrap: anywhere;
}
.item .headline .ico { color: var(--text-3); margin-top: 4px; }
.item .status { margin-top: 4px; }
.item .context { margin-top: 6px; font: 400 15px/22px var(--font-ui); color: var(--text-2); }
.item .quote-compact { margin-top: 8px; }
.quote-compact .full .text-link { margin-top: 4px; }
.item .item-actions { margin-top: 12px; }

/* Los demás pendientes: una fila con frase (16 px, hasta 2 líneas) y estado; toda la fila es el toque */
.prow { border-top: 1px solid var(--border); }
.prow:first-child { border-top: 0; }
.prow-link {
  display: block; position: relative; min-height: 56px; padding: 10px 0;
  color: var(--text); text-decoration: none; list-style: none; cursor: pointer; border-radius: var(--r-sm);
}
.prow-link::-webkit-details-marker { display: none; }
.prow-link > .ico { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.prow-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prow-phrase { display: block; padding-right: 24px; font: 500 16px/22px var(--font-ui); overflow-wrap: anywhere; }
.prow-details > summary .chev { transform: translateY(-50%) rotate(90deg); transition: transform var(--t-base) var(--ease); }
.prow-details[open] > summary .chev { transform: translateY(-50%) rotate(-90deg); }
.prow-body { padding: 0 0 14px; }
.prow-body .context { font: 400 14px/20px var(--font-ui); color: var(--text-2); }
.prow-body .quote-compact { margin-top: 8px; }
.prow-body .item-actions { margin-top: 10px; }

/* Teléfono: 3 por sección; "Ver los n ..." abre la sección entera en su propia pantalla, con "Hoy" para volver */
.see-all {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0;
  border: 0; border-top: 1px solid var(--border); background: none; color: var(--text);
  font: 600 15px/20px var(--font-ui); text-align: left; cursor: pointer;
}
.see-all .ico { flex: none; color: var(--text-3); }
.see-all:focus-visible { outline: 2px solid var(--focus, var(--text)); outline-offset: 2px; border-radius: var(--r-sm); }
.section-view { position: absolute; inset: 30px 0 0; z-index: 5; display: flex; flex-direction: column; background: var(--background); }
.section-view[hidden] { display: none; }
.view-head { padding: 0 16px; }
.view-head .view-back { margin-left: -16px; color: var(--text); }
.view-head .group-title { margin-top: 8px; }
.view-scroll { flex: 1; overflow-y: auto; padding: 0 16px 24px; overscroll-behavior: contain; }
.view-scroll .more-link { margin-top: 8px; }

/* Cierre: todos los abiertos, la agenda y lo cerrado ayer, en un solo grupo */
.folds { margin-top: 12px; }
.open-all {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 14px; color: var(--text); text-decoration: none; border-radius: var(--r-md);
}
.open-all .ico { color: var(--text-3); }
.open-all-text { display: flex; flex-direction: column; min-width: 0; }
.open-all strong { font: 600 15px/20px var(--font-ui); }
.open-all-sub { font: 400 13px/18px var(--font-ui); color: var(--text-2); }
.fold .quote-compact { background: var(--surface-2); }
.fold-body .more-link { margin-top: 0; }

.agenda-list, .closed-list { list-style: none; margin: 0; padding: 0; }
.agenda-list li + li { border-top: 1px solid var(--border); }
.agenda-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; grid-template-areas: "time ico" "main ico"; column-gap: 8px; align-items: start;
  min-height: 52px; padding: 10px 0; color: var(--text); text-decoration: none;
}
.agenda-row time { grid-area: time; font: 500 13px/20px var(--font-mono); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.agenda-row .ico { grid-area: ico; align-self: center; color: var(--text-3); }
.agenda-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.agenda-title { font: 600 16px/22px var(--font-ui); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agenda-who { font: 400 14px/20px var(--font-ui); color: var(--text-2); overflow-wrap: anywhere; }
.agenda-pending { margin-top: 2px; font: 500 14px/20px var(--font-ui); color: var(--text); }
.phone .agenda-row { padding: 12px 0; }

.closed-list li + li { border-top: 1px solid var(--border); }
/* Lo cerrado ayer: una línea por cerrado, sin la cita a la vista; tocarla abre la cita */
.closed-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0;
  color: var(--text); text-decoration: none; border-radius: var(--r-sm);
}
.closed-row > .ico { color: var(--text-3); }
.closed-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.closed-what { min-width: 0; font: 400 15px/22px var(--font-ui); color: var(--text-2); overflow-wrap: anywhere; }

/* Escritorio: filas sin rayas, con la abierta resaltada */
.pane.list .items { display: grid; gap: 2px; }
.pane.list .item { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: var(--r-md); }
.pane.list .item + .item { border-top: 0; }
.pane.list .item.selected, .pane.list .prow.selected { background: var(--surface); }
.pane.list .item.selected .quote-compact { background: var(--surface-2); }
.pane.list .item .headline { position: relative; z-index: 1; padding-block: 10px; margin-block: -8px -10px; font-size: 16px; }
.pane.list .prow { margin: 0 -12px; padding: 0 12px; border-top: 0; border-radius: var(--r-md); }
.pane.list .agenda-row { padding-left: 0; }

/* Escritorio, sin pendiente abierto: tu día (la agenda y lo cerrado ayer, abiertos) */
.day-block + .day-block { margin-top: 40px; }
.day-title {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); font: 700 21px/26px var(--font-display); letter-spacing: -0.01em; color: var(--text);
}
.day-title .count { font: 500 14px/20px var(--font-ui); color: var(--text-2); }
.day .agenda-row { min-height: 64px; padding: 14px 0; }
.day .agenda-row time { font-size: 14px; }
.day .fold-note { margin-top: 12px; }
.day .quote-compact { background: var(--background); }

/* Estados de Hoy */
.empty { margin-top: 28px; }
.empty h2 { font: 700 22px/28px var(--font-display); letter-spacing: -0.01em; }
.empty p { margin-top: 8px; max-width: 32ch; color: var(--text-2); font-size: 15px; line-height: 22px; text-wrap: pretty; }
.empty .next-meeting { max-width: 420px; margin-top: 20px; }
.empty .empty-chat { margin-top: 12px; }
.empty .folds { margin-top: 24px; }

.skeleton { display: grid; gap: 16px; margin-top: 20px; }
.desk .skeleton { max-width: 520px; }
.skeleton .sk-text { font: 500 14px/20px var(--font-ui); color: var(--text-2); }
.skeleton .sk-bar { display: block; height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--text-3) 80%, var(--background)); }
.skeleton .sk-bar.head { height: 18px; }
.skeleton .sk-bar.sk-button { height: 48px; border-radius: var(--r-md); margin-top: 4px; }
.skeleton .w30 { width: 30%; } .skeleton .w40 { width: 40%; } .skeleton .w50 { width: 50%; }
.skeleton .w60 { width: 60%; } .skeleton .w70 { width: 70%; } .skeleton .w80 { width: 80%; } .skeleton .w90 { width: 90%; }
.sk-lead { display: grid; gap: 8px; }
.sk-next { display: grid; gap: 10px; min-height: 48px; padding: 14px; border-radius: var(--r-md); background: var(--surface); }
.sk-section { margin-top: 12px; }
.sk-title { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sk-item { display: grid; gap: 10px; padding: 14px 0; }
.sk-row { display: grid; gap: 8px; min-height: 56px; padding: 14px 0; border-top: 1px solid var(--border); }
.sk-title + .sk-row { border-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton .sk-bar { animation: sk-breathe 1.6s var(--ease) infinite alternate; }
  @keyframes sk-breathe {
    from { background: color-mix(in srgb, var(--text-3) 80%, var(--background)); }
    to { background: color-mix(in srgb, var(--text-3) 70%, var(--background)); }
  }
}

/* Sin conexión: el aviso pegado arriba y las acciones apagadas hasta que vuelva la señal */
.screen:has(> .offline) { padding-top: 0; }
.screen > .offline { position: sticky; top: 0; z-index: 2; margin: 0 -16px 12px; }
:is(.screen:has(> .offline), .desk.with-banner) :is(.item-actions .btn, .detail-actions .btn, .more-options button, .more-options summary),
.phone:has(.screen > .offline) .action-bar .btn {
  opacity: 0.6; cursor: not-allowed; border: 1px dashed var(--text-3); background: transparent; color: var(--text-2);
}

/* ---------- Detalle ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-2); text-decoration: none; font: 500 15px/20px var(--font-ui); }
.detail-status { margin-top: 8px; }
.detail-title { margin-top: 8px; font: 700 28px/34px var(--font-display); letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.detail-who { margin-top: 6px; font: 400 15px/22px var(--font-ui); color: var(--text-2); overflow-wrap: anywhere; }
.detail-who strong { color: var(--text); font-weight: 600; }
.detail-actions { margin-top: 24px; }
.quote-snippet { margin-top: 16px; }
.history-toggle { margin-top: 20px; }
.history { list-style: none; margin: 0; padding: 4px 0 0; }
.history li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; padding: 10px 0; font-size: 15px; line-height: 22px; }
.history li .ico { justify-self: center; margin-top: 3px; }
.history li .when { display: block; font: 400 12px/16px var(--font-mono); color: var(--text-3); }

/* Escritorio: una columna de 600 px; primero el hecho y sus pruebas, al final lo que puedes hacer */
.pane.detail .quote-snippet, .pane.detail .fold, .pane.detail .more-options { background: var(--background); }
.pane.detail .quote-snippet { margin-top: 24px; border-color: transparent; }
.pane.detail .history-toggle { margin-top: 8px; }
.pane.detail .detail-status { margin-top: 0; padding-right: 48px; }
.pane.detail .detail-title { margin-top: 10px; padding-right: 48px; font-size: 28px; line-height: 34px; }
.pane.detail .detail-who { margin-top: 10px; }
.pane.detail .detail-who + .detail-who { margin-top: 2px; }
.pane.detail .detail-actions { display: grid; gap: 8px; margin-top: 32px; }
.pane.detail .detail-actions .btn { width: 100%; }
.pane-close {
  position: absolute; top: 24px; right: 20px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 22px; color: var(--text-2); text-decoration: none;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.pane-close:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Recordarme ---------- */
.draft { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 12px; margin-top: 8px; }
.draft-what { grid-column: 1; grid-row: 1; font: 600 17px/24px var(--font-ui); color: var(--text); overflow-wrap: anywhere; text-wrap: pretty; }
.draft-input { grid-column: 1; grid-row: 1; }
.draft-input[hidden], .draft-what[hidden] { display: none; }
.draft-edit { grid-column: 2; grid-row: 1; margin-top: -10px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
/* fieldset.when: la pregunta de Recordarme. Solo el fieldset, para no tocar la fecha de "Ver lo que ha pasado" (.history .when). */
fieldset.when { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
fieldset.when legend { padding: 0; font: 600 16px/22px var(--font-ui); color: var(--text); }
fieldset.when legend + .choice { margin-top: 10px; }
.channel { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font: 400 14px/20px var(--font-ui); color: var(--text-2); text-wrap: pretty; }
.channel .ico { margin-top: 2px; }
.confirm-help { font: 400 14px/20px var(--font-ui); color: var(--text-2); }
.sheet .confirm-help { margin-top: 4px; text-align: center; }
.dialog .confirm-help { margin-top: 8px; text-align: right; }
:is(.sheet, .dialog):has(.confirm-reminder:not([aria-disabled="true"])) .confirm-help { display: none; }

/* ---------- Chat ---------- */
.chat-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.chat-head h1 { font: 700 22px/28px var(--font-display); letter-spacing: -0.01em; }
.chat-head p { font: 400 13px/18px var(--font-ui); color: var(--text-3); }
.thread { display: grid; gap: 18px; margin-top: 18px; }
.thread > * { min-width: 0; }
.msg-user {
  justify-self: end; max-width: 80%; padding: 10px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--ink); color: var(--on-ink); font: 400 16px/22px var(--font-ui); overflow-wrap: anywhere;
}
.msg-asisto { font: 400 16px/24px var(--font-ui); color: var(--text); }
.answer-lead { font: 400 16px/24px var(--font-ui); overflow-wrap: anywhere; }
.answer-items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.answer-items .section-link { padding: 0 2px; }
.commit-card { min-width: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.commit-card .direction { font: 500 13px/18px var(--font-ui); color: var(--text-2); }
.commit-card .what { margin-top: 2px; font: 600 16px/22px var(--font-ui); color: var(--text); overflow-wrap: anywhere; }
.commit-card .status { margin-top: 4px; }
.commit-card .quote-compact { margin-top: 10px; background: var(--surface-2); }

.composer { border-top: 1px solid var(--border); background: var(--surface); padding: 10px 12px 8px; }
.composer .field { display: flex; align-items: center; gap: 8px; }
.composer input { flex: 1; min-width: 0; }

.chat-empty { margin-top: 20px; }
.chat-empty .welcome { font: 400 17px/26px var(--font-ui); color: var(--text); max-width: 34ch; }
.chat-empty .starters-title { margin-top: 28px; font: 600 14px/18px var(--font-ui); color: var(--text-2); }
.starters { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.starter {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text);
  font: 500 16px/22px var(--font-ui); text-decoration: none; cursor: pointer;
}
.starter .chev { flex: none; color: var(--text-3); }
.starter:hover { border-color: var(--text-3); }

.desk .chat-pane { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; background: var(--background); }
.desk .chat-pane > header { margin-top: 0; padding: 28px max(48px, calc((100% - 720px) / 2)) 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.desk .chat-pane .scroll { overflow-y: auto; padding: 24px 48px; }
.desk .chat-pane .thread, .desk .chat-pane .chat-empty { max-width: 720px; margin: 0 auto; }
.desk .chat-pane .composer { padding: 14px 48px 18px; }
.desk .chat-pane .composer > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.desk .chat-pane .proposal { padding: 20px; }

/* ---------- Antes de una reunión (S3-12) ---------- */
/* El aviso en la pantalla bloqueada: el teléfono es del sistema, con su letra; solo el aviso es de Asisto. */
.phone.lock { background: #101513; color: #F4F6F4; }
.phone.lock .statusbar { color: rgb(244 246 244 / 0.8); }
.lock-screen { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 12px 24px; font-family: system-ui, Roboto, sans-serif; }
.lock-time { font: 300 76px/1 system-ui, Roboto, sans-serif; letter-spacing: -0.02em; }
.lock-date { margin-top: 8px; font: 400 16px/22px system-ui, Roboto, sans-serif; color: rgb(244 246 244 / 0.8); }
.push {
  display: grid; gap: 2px; width: 100%; padding: 14px 16px; border-radius: 20px; text-decoration: none;
  background: rgb(250 251 250 / 0.94); color: #1A1F1D; font-family: system-ui, Roboto, sans-serif;
}
.lock-screen .push { margin-top: 48px; }
.push-app { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font: 500 13px/18px system-ui, Roboto, sans-serif; color: #4A524E; }
.push-app img { width: 18px; height: 18px; border-radius: 5px; }
.push-when { margin-left: 4px; }
.push-title { font: 600 15px/20px system-ui, Roboto, sans-serif; }
.push-body { font: 400 14px/20px system-ui, Roboto, sans-serif; color: #2E3532; }
/* Escritorio: notificación del sistema arriba a la derecha, sobre lo que esté abierto. */
.os-push { position: absolute; top: 16px; right: 16px; z-index: 6; width: 360px; border-radius: 14px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.45); }

/* El brief previo: la reunión, sus pendientes con su cita y lo que se habló la última vez */
.previo-head { margin-top: 16px; }
.previo-head .detail-title { margin-top: 0; }
.last-meeting { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); }
.last-source { font: 600 14px/20px var(--font-ui); color: var(--text); overflow-wrap: anywhere; }
.last-summary { margin-top: 6px; font: 400 16px/24px var(--font-ui); color: var(--text); text-wrap: pretty; }
.last-meeting .text-link { margin-top: 2px; }
.desk .doc-pane { min-height: 0; overflow-y: auto; padding: 48px 56px 64px; background: var(--background); }
.doc-pane > .doc { max-width: 720px; margin: 0 auto; }
.desk .doc-pane .previo-head { margin-top: 0; }

/* ---------- Correo del brief del día ----------
   La bandeja es del cliente de correo (Gmail, Mail), no de Asisto: letra del sistema y grises neutros, siempre en claro.
   El correo en sí lleva sus estilos en línea (correo.py). */
.mail-client { background: #FFFFFF; color: #1F2421; font-family: system-ui, Roboto, sans-serif; }
.phone.mail-client .statusbar { color: #4A4F4C; }
.mail-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; font: 500 15px/20px system-ui, Roboto, sans-serif; color: #3C423F; }
.mail-meta { padding: 12px 16px 14px; background: #FFFFFF; }
.mail-subject { font: 600 20px/26px system-ui, Roboto, sans-serif; color: #1F2421; }
.mail-from { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 8px; font: 400 14px/20px system-ui, Roboto, sans-serif; color: #4A4F4C; }
.mail-from strong { color: #1F2421; font-weight: 600; }
.mail-from span { margin-left: auto; color: #6B716E; }
.mail-to { font: 400 13px/18px system-ui, Roboto, sans-serif; color: #6B716E; }
.screen.mail-reader { padding: 0; }
/* En el teléfono, el correo va de borde a borde. En el correo real esto va como @media en su <style>. */
.phone .mail-body { padding: 0 !important; }
.phone .mail-card { border-radius: 0 !important; }
.phone .mail-head, .phone .mail-content, .phone .mail-foot { padding-left: 20px !important; padding-right: 20px !important; }
.phone .mail-head > div { margin-left: -20px !important; margin-right: -20px !important; }
.phone .mail-time { width: 76px !important; }
.desk-mail { width: 100vw; height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); background: #F6F7F6; }
.mail-folders { padding: 24px 16px; border-right: 1px solid #E3E6E4; font: 500 14px/20px system-ui, Roboto, sans-serif; color: #4A4F4C; }
.mail-folders p { padding: 8px 12px; border-radius: 8px; }
.mail-folders p:first-child { background: #E8ECE9; color: #1F2421; font-weight: 600; }
.desk-mail .mail-reader { min-height: 0; overflow-y: auto; }
.desk-mail .mail-meta { max-width: 600px; margin: 0 auto; padding: 32px 0 8px; background: none; }

/* ---------- Pantalla suelta (dentro del navegador de prototipos) ---------- */
.screen-doc { background: var(--background); overflow: hidden; }
.screen-doc .phone { width: 100vw; height: 100vh; border-radius: 0; outline: 0; box-shadow: none; }
.screen-doc .pane, .screen-doc .screen, .screen-doc .scroll { overscroll-behavior: contain; }

/* ---------- Notas técnicas (capa del prototipo, no es interfaz del producto) ---------- */
/* Sin recuadros: solo el elemento de la nota abierta se resalta, por fuera, sin tocar su texto. */
.notes-on .note-target.note-active { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.note-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.note-layer .note-pin {
  position: absolute; left: 0; top: 0; box-sizing: border-box; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--background); cursor: pointer;
  background: var(--ink); color: var(--on-ink); font: 600 10px/1 var(--font-mono); text-decoration: none;
  box-shadow: 0 2px 6px rgb(11 21 18 / 0.25); pointer-events: auto;
}
.note-layer .note-pin[hidden] { display: none; }
.note-layer .note-pin.tight { width: 14px; height: 14px; border-width: 1px; font-size: 8px; }
.note-layer .note-pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; } /* toque de 34 px */
.note-layer .note-pin.note-active { box-shadow: 0 0 0 2px var(--text), 0 2px 6px rgb(11 21 18 / 0.25); }
.note-layer .note-bubble {
  position: absolute; left: 0; top: 0; z-index: 1; padding: 10px 12px; border-radius: var(--r-md); pointer-events: auto;
  background: var(--ink); color: var(--on-ink); box-shadow: 0 12px 32px -8px rgb(11 21 18 / 0.45);
  font: 400 13px/19px var(--font-ui); text-wrap: pretty;
}
.note-layer .note-bubble[hidden] { display: none; }
.note-layer .note-bubble .note-bubble-kind { margin-bottom: 2px; font: 600 12px/16px var(--font-ui); opacity: 0.8; }

/* ---------- Navegador de prototipos (index.html) ---------- */
.hub { height: 100vh; display: grid; grid-template-rows: 64px 1fr; overflow: hidden; background: var(--surface-2); }
.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.hub-brand { display: flex; align-items: center; gap: 14px; }
.hub-brand .wordmark { height: 22px; }
.hub-brand span { font: 600 15px/20px var(--font-ui); color: var(--text-2); padding-left: 14px; border-left: 1px solid var(--border); }
.hub-tools { display: flex; align-items: center; gap: 12px; }
.theme-switch, .device-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.theme-switch button, .device-switch button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-2); font: 500 14px/18px var(--font-ui); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.theme-switch button[aria-pressed="true"], .device-switch button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.hub-body { display: grid; grid-template-columns: 264px 1fr; min-height: 0; }
.hub-nav { overflow-y: auto; padding: 16px 12px 24px; background: var(--surface); border-right: 1px solid var(--border); }
.hub-nav h2 { margin: 20px 10px 6px; font: 600 13px/16px var(--font-ui); color: var(--text-3); }
.hub-nav h2:first-child { margin-top: 4px; }
.hub-nav a {
  display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px;
  border-radius: var(--r-md); color: var(--text-2); text-decoration: none; font: 500 14px/18px var(--font-ui);
}
.hub-nav a:hover { background: var(--surface-2); color: var(--text); }
.hub-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.hub-nav .code { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font: 500 12px/1 var(--font-mono); }
.hub-nav a[aria-current="page"] .code { background: color-mix(in srgb, var(--on-ink) 16%, transparent); color: var(--on-ink); }
.hub-nav .code .ico { width: 14px; height: 14px; }
/* Grupos que se abren y se cierran: ícono, nombre, cuántas pantallas tiene y la flecha */
.hub-nav .nav-group { margin-top: 2px; }
.hub-nav .nav-group:first-of-type { margin-top: 16px; }
.hub-nav .nav-group h2 { margin: 0; }
.nav-toggle {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 6px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: 600 14px/18px var(--font-ui);
  text-align: left; cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-2); }
.nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.nav-toggle > .ico:first-child { color: var(--text-2); }
.nav-group.has-current .nav-toggle > .ico:first-child { color: var(--text); }
.nav-count { font: 500 12px/1 var(--font-mono); color: var(--text-3); }
.nav-chev { color: var(--text-3); }
.nav-toggle[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }
.nav-group .nav-items { margin: 2px 0 8px 19px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-items[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .nav-chev { transition: transform var(--t-fast) var(--ease); } }
.hub-main { min-width: 0; min-height: 0; display: grid; }

.viewer { display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.viewer.page-mode { grid-template-columns: 1fr; }
.stage { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: auto; }
.stage.full { padding: 0; place-items: stretch; }
.stage.full iframe { width: 100%; height: 100%; border: 0; display: block; }
.device { border-radius: var(--r-lg); overflow: hidden; background: var(--background); box-shadow: 0 1px 2px rgb(16 32 27 / 0.06), 0 16px 40px -12px rgb(16 32 27 / 0.28); outline: 1px solid var(--border); }
.device iframe { display: block; border: 0; }
.device.phone-size iframe { width: 360px; height: 760px; }
.device.desk-size { transform-origin: top center; }
.device.desk-size iframe { width: 1440px; height: 900px; transform-origin: 0 0; }
.scale-note { font: 400 12px/16px var(--font-mono); color: var(--text-3); text-align: center; margin-top: 8px; }
.viewer.desktop-mode { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: start; overflow-y: auto; }
.viewer.desktop-mode .stage { padding: 24px 24px 8px; place-items: start center; overflow: visible; min-height: auto; }
.viewer.desktop-mode .info { border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; align-content: start; }
.viewer.desktop-mode .info > .info-head, .viewer.desktop-mode .info > .desc, .viewer.desktop-mode #tech-notes { grid-column: 1 / -1; }

.info { overflow-y: auto; padding: 28px 24px; background: var(--surface); border-left: 1px solid var(--border); }
.info .info-head { display: flex; align-items: center; gap: 10px; }
.info .code { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink); font: 500 13px/1 var(--font-mono); }
.info h1 { font: 700 22px/28px var(--font-display); letter-spacing: -0.01em; }
.info .desc { margin-top: 12px; font-size: 15px; line-height: 22px; color: var(--text); }
.info h3 { margin-top: 24px; font: 600 13px/16px var(--font-ui); color: var(--text-3); }
.info ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.info li { font-size: 14px; line-height: 20px; color: var(--text-2); }
.info .jump {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--background); cursor: pointer; color: var(--text);
}
.info .jump .how { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.info .jump strong { font: 600 14px/20px var(--font-ui); }
.info .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.info .tag { padding: 2px 8px; border-radius: var(--r-sm); background: var(--surface-2); font: 500 12px/18px var(--font-mono); color: var(--text-2); }
.info .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
.info .open-alone { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--text-2); font-size: 14px; text-underline-offset: 3px; }

.tech-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tech-notes button {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px; width: 100%; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--background); color: var(--text);
  font: 400 14px/20px var(--font-ui); cursor: pointer;
}
.tech-notes button.active { border-color: var(--text); }
.tech-notes .pin-number { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font: 600 11px/1 var(--font-mono); }
.tech-notes .note-kind { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font: 600 12px/16px var(--font-ui); color: var(--text-2); }
.tech-notes .tag { padding: 0 6px; }

/* Mapa del flujo */
.map { overflow-y: auto; padding: 32px 40px 48px; }
.map > header h1 { font: 700 28px/34px var(--font-display); letter-spacing: -0.02em; }
.map > header p { margin-top: 6px; max-width: 68ch; color: var(--text-2); }
.lane { margin-top: 36px; }
.lane h2 { font: 600 17px/24px var(--font-ui); }
.lane > p { margin-top: 2px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.lane-row { display: flex; align-items: center; gap: 0; margin-top: 14px; overflow-x: auto; padding-bottom: 8px; }
.lane-row.variants { gap: 24px; }
.node { flex: none; display: grid; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); }
.node .thumb { overflow: hidden; border-radius: 12px; outline: 1px solid var(--border); background: var(--background); box-shadow: 0 1px 2px rgb(16 32 27 / 0.06), 0 8px 20px -10px rgb(16 32 27 / 0.25); transition: transform var(--t-fast) var(--ease); }
.node:hover .thumb { transform: translateY(-2px); }
.node .thumb iframe { border: 0; pointer-events: none; transform-origin: 0 0; display: block; }
.node .thumb.phone-size { width: 144px; height: 304px; }
.node .thumb.phone-size iframe { width: 360px; height: 760px; transform: scale(0.4); }
.node .thumb.map-desk { width: 403px; height: 252px; }
.node .thumb.map-desk iframe { width: 1440px; height: 900px; transform: scale(0.28); }
.node .label { display: flex; align-items: center; gap: 8px; font: 600 14px/18px var(--font-ui); }
.node .label .code { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-sm); background: var(--surface); outline: 1px solid var(--border); font: 500 12px/1 var(--font-mono); color: var(--text-2); }
.edge { flex: none; width: 168px; display: grid; justify-items: center; gap: 6px; padding: 0 12px; margin-bottom: 26px; }
.edge .arrow { width: 100%; height: 12px; color: var(--text-3); }
.edge span { font-size: 13px; line-height: 18px; color: var(--text-2); text-align: center; }
.outcome { flex: none; width: 180px; margin-bottom: 26px; padding: 14px; border-radius: var(--r-md); border: 1px dashed var(--border); font-size: 14px; line-height: 20px; color: var(--text-2); }

@media (max-width: 1100px) {
  .viewer { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .info { border-left: 0; border-top: 1px solid var(--border); max-height: 40vh; }
}
@media (max-width: 760px) {
  .hub-body { grid-template-columns: 1fr; }
  .hub-nav { display: none; }
}
@media (max-width: 720px) {
  .theme-switch { align-self: flex-start; }
  .phone { width: auto; }
}

/* ---------- Catálogo del sistema de diseño (pantallas/sistema.html) ---------- */
.screen-doc:has(.ds) { overflow: auto; }
.ds { max-width: 1120px; margin: 0 auto; padding: 40px 32px 80px; }
.ds-head h1 { font: 700 34px/40px var(--font-display); letter-spacing: -0.02em; }
.ds-head > p { margin-top: 8px; max-width: 68ch; color: var(--text-2); }
.ds-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ds-toc a { padding: 6px 12px; border-radius: 18px; border: 1px solid var(--border); color: var(--text-2); text-decoration: none; font: 500 14px/20px var(--font-ui); }
.ds-toc a:hover { color: var(--text); border-color: var(--text-3); }
.ds-section { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
.ds-section > header h2 { font: 700 24px/30px var(--font-display); letter-spacing: -0.01em; }
.ds-section > header p { margin-top: 6px; max-width: 72ch; color: var(--text-2); font-size: 15px; line-height: 22px; }
.ds-section > header .ds-code { margin-top: 8px; font: 400 13px/18px var(--font-mono); color: var(--text-3); }
.ds-section h3 { margin-top: 28px; font: 600 15px/20px var(--font-ui); color: var(--text); }
.ds-note { margin-top: 4px; max-width: 72ch; font-size: 14px; line-height: 20px; color: var(--text-2); }
.ds-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-top: 16px; }
.ds-sample { margin: 0; min-width: 0; }
.ds-sample.narrow { width: 328px; }
.ds-sample.wide { width: 420px; }
.ds-sample.card { width: 360px; }
.ds-box { padding: 20px; border-radius: var(--r-lg); background: var(--surface); outline: 1px solid var(--border); }
.ds-box > .proposal, .ds-box > .more-options, .ds-box > .fold, .ds-box > .folds, .ds-box > .quote-compact, .ds-box > .quote-snippet { background: var(--background); }
.ds-box > .proposal { border-color: transparent; }
.ds-sample figcaption { margin-top: 8px; font: 500 13px/18px var(--font-ui); color: var(--text-2); }
