/* Documentación para usuarios: página aparte (docs.html), misma estética que la app. */
body.docs { overflow: auto; height: auto; display: block; }
.dbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--paper); border-bottom: 1px solid rgba(0,0,0,.15); }
.dbar h1 { font: 400 26px var(--hand); margin: 0; flex: 1; }
.dbar a { color: inherit; text-decoration: none; font-size: 22px; }
#d-lang { display: flex; gap: 8px; flex-wrap: wrap; font-size: 15px; }
#d-lang button { background: none; border: 0; font: inherit; cursor: pointer; opacity: .5; padding: 2px 4px; }
#d-lang button.on { opacity: 1; text-decoration: underline; }
.dwrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; max-width: 1000px; margin: 0 auto; padding: 24px 20px 80px; }
#d-toc { position: sticky; top: 70px; align-self: start; display: flex; flex-direction: column; gap: 6px; font: 17px var(--hand); max-height: calc(100vh - 90px); overflow-y: auto; }
#d-toc a { color: inherit; text-decoration: none; opacity: .65; padding: 2px 0; }
#d-toc a:hover, #d-toc a.on { opacity: 1; text-decoration: underline; }
#d-toc .grp { margin-top: 12px; font-size: 14px; opacity: .45; text-transform: uppercase; letter-spacing: .06em; }
#d-body section { margin-bottom: 44px; scroll-margin-top: 70px; }
#d-body h2 { font: 400 30px var(--hand); margin: 0 0 8px; }
#d-body h3 { font: 400 21px var(--hand); margin: 20px 0 4px; }
#d-body p, #d-body li { font: 16px/1.6 var(--type); max-width: 68ch; }
#d-body ul, #d-body ol { padding-left: 22px; }
#d-body li { margin: 4px 0; }
#d-body kbd { font: 14px var(--type); border: 1px solid rgba(0,0,0,.35); border-radius: 4px; padding: 0 5px; background: var(--sheet); }
#d-body code { font: 15px var(--type); background: rgba(0,0,0,.06); padding: 0 4px; border-radius: 3px; }
#d-body .callout { border-left: 3px solid var(--ink); background: var(--sheet); padding: 6px 14px; margin: 12px 0; max-width: 68ch; }
#d-body table { border-collapse: collapse; font: 15px var(--type); }
#d-body td, #d-body th { border-bottom: 1px solid rgba(0,0,0,.15); padding: 6px 14px 6px 0; text-align: left; vertical-align: top; }
@media (max-width: 760px) {
  .dwrap { grid-template-columns: 1fr; gap: 16px; }
  #d-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  #d-toc .grp { display: none; }
}

/* ---------- color y piezas visuales ---------- */
body.docs { --c1: #3b6ea5; --c2: #d9822b; --c3: #4a8f5c; --c4: #c4567a; --c5: #7a5fb0; --c6: #2b8a8a; }
.c1 { --ac: var(--c1); } .c2 { --ac: var(--c2); } .c3 { --ac: var(--c3); } .c4 { --ac: var(--c4); } .c5 { --ac: var(--c5); } .c6 { --ac: var(--c6); }
#d-toc a { display: flex; gap: 8px; align-items: baseline; border-left: 3px solid transparent; padding-left: 8px; }
#d-toc a i { font-style: normal; font-size: 15px; }
#d-toc a:hover, #d-toc a.on { border-left-color: var(--ac); text-decoration: none; }
#d-toc .grp { color: var(--ink); }
#d-body section { border-left: 4px solid var(--ac); padding-left: 22px; }
#d-body h2 { display: flex; align-items: center; gap: 12px; }
#d-body h2 i { font-style: normal; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-size: 22px; background: color-mix(in srgb, var(--ac) 16%, var(--sheet)); }
#d-body h3 { color: var(--ac); }
#d-body a { color: var(--ac); }
#d-body .callout { border-left-color: var(--ac); background: color-mix(in srgb, var(--ac) 8%, var(--sheet)); border-radius: 0 8px 8px 0; }
#d-body kbd { border-bottom-width: 2px; }
#d-body th { color: var(--ac); }

/* capturas con números */
.shot { margin: 18px 0 26px; }
.shot .shotpic { position: relative; border: 1px solid rgba(0,0,0,.2); border-radius: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.12); background: var(--paper); max-width: 880px; }
.shot img { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--ac); color: #fff; font: 700 12px/22px var(--type); text-align: center; box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0,0,0,.35); }
.shot figcaption ol { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 6px; }
.shot figcaption li { counter-increment: p; display: flex; gap: 10px; align-items: baseline; font: 15px/1.4 var(--type); }
.shot figcaption li::before { content: counter(p); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ac); color: #fff; font: 700 13px/22px var(--type); text-align: center; }

/* tarjetas, flujos, ejemplos */
.hero .lead { font: 22px/1.45 var(--hand); max-width: 56ch; margin: 0 0 16px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 14px 0 22px; }
.card { background: var(--sheet); border: 1px solid rgba(0,0,0,.12); border-top: 5px solid var(--ac); border-radius: 12px; padding: 12px 16px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.card h4 { font: 400 22px var(--hand); margin: 0 0 4px; }
.card p { font: 15px/1.5 var(--type); margin: 4px 0; }
.card small { font: 13px var(--type); opacity: .55; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin: 12px 0 18px; }
.flow span { background: color-mix(in srgb, var(--ac) 14%, var(--sheet)); border: 2px solid var(--ac); border-radius: 12px; padding: 8px 14px; font: 17px var(--hand); }
.flow i { font-style: normal; font-size: 22px; opacity: .5; }
.cases, .prov { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.case { background: var(--sheet); border: 1px solid rgba(0,0,0,.12); border-left: 6px solid var(--ac); border-radius: 12px; padding: 12px 18px 14px; box-shadow: 0 3px 12px rgba(0,0,0,.06); }
#d-body .case h3 { margin: 0; font-size: 24px; }
.case small { font: 13px var(--type); opacity: .55; text-transform: uppercase; letter-spacing: .05em; }
#d-body .case p { font-size: 15px; line-height: 1.55; }
.case code { display: inline-block; margin: 2px 0; white-space: normal; background: color-mix(in srgb, var(--ac) 10%, #fff); color: var(--ink); }
.joke { border-top: 1px dashed rgba(0,0,0,.25); padding-top: 8px; font-style: italic; }
.prov .card h4 { color: var(--ac); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#d-body a.dbtn { display: inline-block; text-decoration: none; background: var(--ac); color: #fff; border: 2px solid var(--ac); border-radius: 999px; padding: 4px 14px; font: 17px var(--hand); }
#d-body a.dbtn.ghost { background: none; color: var(--ac); }
#d-body a.dbtn:hover { filter: brightness(1.1); }
@media (max-width: 760px) {
  #d-body section { padding-left: 14px; }
  .pin { width: 16px; height: 16px; font-size: 9px; line-height: 16px; }
  .cases, .prov { grid-template-columns: 1fr; }
}

/* ---------- réplicas de la interfaz (inertes) ---------- */
.uirow { margin: 22px 0 30px; }
.uirow h3 { margin: 0 0 8px; }
.uidemo { background: var(--paper); border: 1px dashed rgba(0,0,0,.3); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font: 19px/1.35 var(--hand); color: var(--ink); cursor: default; user-select: none; }
.uidemo .bar { padding: 0; min-width: 820px; }
.uidemo .back { font-size: 19px; opacity: .5; padding-right: 8px; }
.uidemo .ttl { flex: 1; font-size: 23px; white-space: nowrap; }
.uidemo .filebox { display: flex; align-items: center; gap: 8px; }
.uidemo .fname { font-size: 14px; opacity: .5; white-space: nowrap; }
.uidemo .autosave { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.uidemo .autosave i { width: 26px; height: 14px; border: 1.5px solid currentColor; border-radius: 8px; position: relative; opacity: .5; }
.uidemo .autosave i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.uidemo .autosave.on i { opacity: 1; }
.uidemo .autosave.on i::after { transform: translateX(12px); }
.uidemo .savenow { font-size: 14px; }
.uidemo .play { font-size: 15px; }
.uidemo .tools button { font-size: 17px; }
.uidemo .notes { max-width: 300px; overflow: visible; }
.uidemo .num { font-size: 22px; }
.uidemo textarea { font-size: 17px; line-height: 1.3; background: var(--line) left bottom / 100% 6px no-repeat; padding-bottom: 5px; field-sizing: content; min-height: 1.6em; width: 100%; }
.uidemo .chips { display: flex; flex-wrap: wrap; gap: 4px 6px; background: var(--line) left bottom / 100% 6px no-repeat; padding-bottom: 5px; min-height: 1.6em; }
.uidemo .strip { display: flex; align-items: center; min-width: 440px; }
.uidemo .gap { opacity: .6; }
.uidemo .fmt { position: static; opacity: 1; padding: 0; justify-content: flex-start; background: none; }
.uidemo .doc { max-width: 62ch; font: 16px/1.7 var(--type); }
.uidemo .sep { display: flex; align-items: center; gap: 14px; margin: .4em 0 .8em; font: 19px var(--hand); }
.uidemo .sep::after { content: ''; flex: 1; height: 6px; background: var(--line) center / 100% 6px no-repeat; }
.uidemo .doc p { margin: 0 0 1em; }
.uidemo .cmdbox { width: min(390px, 100%); padding: 5px 0; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--wob); }
.uidemo .people { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 30px; }
.uidemo .names { list-style: none; margin: 0 0 6px; padding: 0; }
.uidemo .names button, .uidemo .pname { text-transform: uppercase; letter-spacing: .03em; padding-left: 0; }
.uidemo .pname { font-size: 34px; }
.uidemo .newc { opacity: .3; padding-left: 0; }
.uidemo .pfields label { display: block; margin: 8px 0; }
.uidemo .pfields label > span { display: block; font-size: 14px; opacity: .45; }
.uidemo .addphoto { display: grid; place-items: center; width: 90px; aspect-ratio: 3 / 4; font-size: 30px; opacity: .4; }
.uidemo .home { max-width: 520px; }
.uidemo .proj { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.uidemo .proj .pic { width: 96px; }
.uidemo .newp { padding-left: 0; }
.uidemo .keyrows { display: grid; gap: 6px; margin: 12px 0; }
.uilist { margin: 10px 0 0; }
.uidemo .pl { display: flex; flex-direction: column; align-items: flex-start; }
.uidemo .keyrows { gap: 8px; }
.uidemo .key { display: grid; grid-template-columns: 84px minmax(0, 340px); align-items: center; gap: 10px; }
.uidemo .key a { opacity: .6; }
.uidemo .field input { font: 15px var(--type); background: none; padding: 0; width: 100%; }
.uidemo .opt { display: grid; grid-template-columns: 84px 1fr; align-items: center; margin: 8px 0 0; }
.uidemo .opt .lbl { opacity: .45; }

/* páginas legales (legal.html): lo que falta por completar se ve resaltado */
mark.ph { background: color-mix(in srgb, var(--c2) 30%, var(--sheet)); color: inherit; border-radius: 3px; padding: 0 3px; }
