/* TrueAndLie · estilo Escriba: crema, tinta, un acento por producto (naranja). */
:root {
  --crema: #fff8f3;
  --tinta: #2a1b14;
  --tinta-suave: #5c4a40;
  --linea: #e8d9cc;
  --acento: #f26a1b;        /* naranja vivo: rellenos, bordes, barras; lleva texto tinta */
  --acento-tinta: #b94a08;  /* naranja profundo: enlaces y texto sobre crema (AA) */
  --acento-suave: #ffe9d6;
  --alerta: #b3412c;
  --alerta-suave: #fbe6e1;
  --ambar: #b8860b;
  --ambar-suave: #fff3d6;
  --radio: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--crema); color: var(--tinta); font-family: var(--sans); line-height: 1.6; }
p { margin: 0 0 14px; }
ul, ol { margin: 8px 0 16px; padding-left: 24px; }
li { margin: 6px 0; }
li::marker { color: var(--tinta-suave); }
a { color: var(--acento-tinta); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .chip:focus-visible, details.menu summary:focus-visible, details.help summary:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; }
h1, h2, h3, section[id], [id] { scroll-margin-top: 80px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 30; background: var(--tinta); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 14px calc(16px + env(safe-area-inset-left)); border-bottom: 1px solid var(--linea); background: var(--crema); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--tinta); display: flex; align-items: center; gap: 8px; letter-spacing: .2px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--acento); display: inline-block; }
nav { display: flex; align-items: center; }
nav a { color: var(--tinta-suave); }
nav a.active { color: var(--acento-tinta); font-weight: 600; }
details.menu { position: relative; }
details.menu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 10px; border: 1px solid var(--linea); border-radius: 999px; background: #fff; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu[open] summary { border-color: var(--acento); }
.burger { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: var(--tinta); }
.menu .who { font-size: .85rem; color: var(--tinta-suave); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 8px; box-shadow: 0 8px 24px rgba(42, 27, 20, .10); }
.menu-pop a { padding: 9px 12px; border-radius: 10px; text-decoration: none; }
.menu-pop a:hover { background: var(--acento-suave); }
.menu-pop a.active { background: var(--acento-suave); }
.foot { max-width: 1100px; margin: 0 auto; padding: 16px; color: var(--tinta-suave); font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--linea); }
.lang button { background: none; border: 0; padding: 0; color: var(--acento-tinta); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--acento-tinta); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.menu-pop .linkbtn { text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--tinta-suave); }
.menu-pop .linkbtn:hover { background: var(--acento-suave); text-decoration: none; }
.muted { color: var(--tinta-suave); }
.small { font-size: .85rem; line-height: 1.55; }
.mono { font-family: var(--mono); font-size: .85rem; font-variant-numeric: tabular-nums; }
.num, .kpi, .contador, td.mono, .barrow .mono { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: 2rem; margin: 0 0 12px; line-height: 1.15; }
h2 { font-size: 1.3rem; margin: 36px 0 14px; }
h3 { font-size: 1.05rem; margin: 26px 0 10px; }
.card { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px 24px; margin: 14px 0; }
.card > h3:first-child, .card > .lab:first-child h3, .card > h2:first-child { margin-top: 0; }
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.card ul, .card ol { margin: 8px 0 16px; }
.card strong + ul, .card strong + ol, .card .lab + ul, .card .lab + ol { margin-top: 6px; }
.card td .small { margin: 3px 0; }
.card.acento { border-color: var(--acento); background: var(--acento-suave); }
.card.alerta { border-color: var(--alerta); background: var(--alerta-suave); }
.card.ambar { border-color: var(--ambar); background: var(--ambar-suave); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* En una grilla, cada tarjeta es una columna y su último elemento (el botón) queda al pie, alineado con las vecinas. */
.grid > .card { display: flex; flex-direction: column; }
.grid > .card > :last-child { margin-top: auto; margin-bottom: 0; }
.grid > .card > .btn, .grid > .card > a { align-self: flex-start; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { background: var(--acento); color: var(--tinta); border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; }
.btn:hover:not(:disabled) { background: #e05c0f; }
.btn.sec:hover:not(:disabled) { background: var(--acento-suave); border-color: var(--acento); }
.btn.peligro:hover:not(:disabled) { background: #8f3423; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sec { background: #fff; color: var(--tinta); border: 1px solid var(--linea); }
.btn.peligro { background: var(--alerta); }
.btn.chico { padding: 6px 12px; font-size: .85rem; }
.dato { border-top: 1px solid var(--linea); padding: 12px 0; }
.dato p { margin: 0 0 8px; }
.lab { display: flex; align-items: center; gap: 6px; margin: 20px 0 8px; }
.lab:first-child, .field .lab { margin-top: 0; }
.lab label, .lab h3, .lab strong { margin: 0; }
details.help { position: relative; display: inline-block; }
details.help summary { list-style: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--linea); color: var(--acento-tinta); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; }
details.help summary::-webkit-details-marker { display: none; }
details.help summary:hover { border-color: var(--acento); }
details.help[open] summary { background: var(--acento); color: var(--tinta); }
.help-pop { position: absolute; z-index: 5; top: 24px; left: 0; min-width: min(240px, calc(100vw - 48px)); max-width: min(320px, calc(100vw - 48px)); background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(42, 27, 20, .08); }
.ronda > div:last-child .help-pop { left: auto; right: 0; }
select.chico { width: auto; padding: 4px 8px; }
.pw { display: flex; gap: 8px; align-items: center; }
.pw input { flex: 1; }
.eye { white-space: nowrap; }
input[type=text], input[type=email], input[type=number], input[type=password], select, textarea { width: 100%; border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label .small { font-weight: 400; }
/* preparación: secciones colapsables con resumen a la vista */
.lead { max-width: 76ch; line-height: 1.65; margin-bottom: 28px; }
.prep-title { margin: 8px 0 6px; }
.sec { background: #fff; border: 1px solid var(--linea); border-radius: 14px; margin: 12px 0; }
.sec > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary .st { font-weight: 700; }
.sec > summary .sthead { display: inline-flex; align-items: center; gap: 6px; }
.sec > summary .st::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid var(--tinta-suave); border-bottom: 2px solid var(--tinta-suave); transform: rotate(-45deg); margin-right: 12px; transition: transform .15s; }
.sec[open] > summary .st::before { transform: rotate(45deg); }
.sec > summary .cur { color: var(--tinta-suave); font-size: .9rem; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.sec[open] > summary { border-bottom: 1px solid var(--linea); }
.sec > .secbody { padding: 22px 20px 24px; display: grid; gap: 26px; }
.field { display: grid; gap: 8px; }
.field label, .field .lab label { margin: 0; }
.field .muted.small { margin: 0; }
.tacs { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; }
.tacs .tac { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tacs .tac label { margin: 0; font-weight: 500; }
.start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 20px; }
@media (max-width: 600px) { .sec > summary { flex-direction: column; align-items: flex-start; gap: 4px; } .sec > summary .cur { text-align: left; } }
@media (prefers-reduced-motion: reduce) { .sec > summary .st::before { transition: none; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--linea); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
.chip:hover { border-color: var(--acento); }
.chip.on { border-color: var(--acento); background: var(--acento-suave); color: var(--acento-tinta); font-weight: 600; }
.tag { display: inline-block; border-radius: 8px; padding: 2px 8px; font-size: .78rem; background: var(--acento-suave); color: var(--acento-tinta); font-weight: 600; margin: 2px 4px 2px 0; }
.tag.neg { background: var(--alerta-suave); color: var(--alerta); }
.tag.neutro { background: #f1e9e2; color: var(--tinta-suave); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linea); vertical-align: top; line-height: 1.5; }
th { color: var(--tinta-suave); font-weight: 600; font-size: .82rem; }
.bar { height: 10px; background: #f1e9e2; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; background: var(--acento); border-radius: 999px; transform-origin: left center; transition: transform .4s ease-out; }
@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } .btn:active:not(:disabled) { transform: none; } }
.bar.neg > i { background: var(--alerta); }
.barrow { display: grid; grid-template-columns: minmax(0, 150px) 1fr 44px; gap: 10px; align-items: center; margin: 9px 0; font-size: .9rem; }
.barrow > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ronda { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; }
@media (max-width: 860px) { .ronda { grid-template-columns: 1fr; } }
.mesa { padding: 0; overflow: hidden; }
.stateline { padding: 14px 20px; border-bottom: 1px solid var(--linea); background: #fffcf9; }
.chat { display: flex; flex-direction: column; gap: 14px; min-height: 340px; max-height: 62vh; overflow: auto; padding: 18px 20px; overscroll-behavior: contain; min-width: 0; }
.composer { display: grid; gap: 12px; padding: 14px 20px 20px; border-top: 1px solid var(--linea); }
.composer .contador { margin-top: -6px; }
.composer .sec { margin: 0; }
.composer .row { gap: 12px; }
.lateral .sec { margin: 0 0 12px; }
.lateral .sec > summary { flex-direction: column; align-items: flex-start; gap: 2px; }
.lateral .sec > summary .cur { text-align: left; font-size: .85rem; padding-left: 19px; }
.lateral .secbody { gap: 12px; }
.msg { max-width: 88%; min-width: 0; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg.usuario { align-self: flex-end; background: var(--acento-suave); border-bottom-right-radius: 4px; }
.msg.rival { align-self: flex-start; background: #fff; border: 1px solid var(--linea); border-bottom-left-radius: 4px; }
.msg.sistema { align-self: center; background: var(--ambar-suave); color: var(--tinta-suave); font-size: .85rem; border-radius: 10px; }
.msg .prop { margin-top: 6px; font-size: .8rem; color: var(--tinta-suave); }
.msg .quien { font-size: .75rem; font-weight: 700; color: var(--acento-tinta); margin-bottom: 4px; }
.msg.rival .quien { color: var(--tinta-suave); }
.composer textarea { min-height: 70px; }
.contador { text-align: right; font-size: .78rem; color: var(--tinta-suave); }
.propuesta { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 4px 0 0; }
.propuesta label { margin: 0; font-size: .82rem; }
.panel h3 { margin-top: 0; }
.senal { padding: 6px 0; font-size: .9rem; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .9rem; z-index: 20; max-width: 90vw; overflow-wrap: anywhere; }
.hero { padding: 40px 0 20px; }
.hero p { font-size: 1.15rem; max-width: 720px; }
.nota { border-left: 4px solid var(--acento); padding: 6px 12px; margin: 12px 0; background: #fff; border-radius: 0 12px 12px 0; }
.kpi { font-size: 1.6rem; font-weight: 700; }
.lista { list-style: none; padding: 0; margin: 0; }
.lista li { padding: 14px 0; margin: 0; border-bottom: 1px solid var(--linea); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lista li > span { min-width: 0; overflow-wrap: anywhere; }
.card { min-width: 0; overflow-wrap: anywhere; }
details summary { cursor: pointer; font-weight: 600; }
.ok { color: var(--acento-tinta); font-weight: 600; }
.mal { color: var(--alerta); font-weight: 600; }
.hidden { display: none; }

/* landing comercial */
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--acento-tinta); font-weight: 700; margin: 0 0 8px; }
h1.big { font-size: 2.8rem; line-height: 1.08; max-width: 820px; }
@media (max-width: 600px) { h1.big { font-size: 2rem; } }
.demo textarea { min-height: 80px; }
.step { position: relative; padding-top: 24px; }
.step .num { position: absolute; top: -14px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--acento); color: var(--tinta); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.who { padding-left: 18px; }
.who li { margin: 8px 0; }
.plan ul { padding-left: 18px; }
.plan .kpi { margin: 4px 0 10px; }
.sharecard { width: 100%; max-width: 600px; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--linea); border-radius: 12px; display: block; margin: 8px 0 12px; }
