/* Thesia · Estructura de la tesis · 25/11/2026 · Responsable: ing.victorjm@gmail.com */
/* Todo acotado a #estructura-app. Clases con prefijo est-. */

#estructura-app{overflow-wrap:break-word}
#estructura-app *,#estructura-app *::before,#estructura-app *::after{box-sizing:border-box}

/* Barra superior: modelo y acciones */
#estructura-app .est-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px 24px;margin-bottom:16px}
#estructura-app .est-modelos{min-width:0}
#estructura-app .est-chips{display:flex;flex-wrap:wrap;gap:8px}
#estructura-app .est-chips .t-chip{min-height:40px;line-height:1.25;text-align:left}
#estructura-app .est-acciones{display:flex;flex-wrap:wrap;gap:8px}
#estructura-app .est-acciones .btn{min-height:40px;gap:6px}
#estructura-app .est-btn-reset[aria-expanded=true]{border-color:#bf827b;color:#933f36}

/* Confirmación de reinicio */
#estructura-app .est-confirm{border:1px solid #e3c4bd;background:#fbf3f1;border-radius:8px;padding:14px 16px;margin-bottom:16px;display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;justify-content:space-between}
#estructura-app .est-confirm[hidden]{display:none}
#estructura-app .est-confirm p{margin:0;font-size:14px;line-height:1.55;color:#5b2d27;flex:1 1 320px}
#estructura-app .est-confirm-btns{display:flex;flex-wrap:wrap;gap:8px}
#estructura-app .est-btn-peligro{background:#933f36;border-color:#933f36;color:#fff}
#estructura-app .est-btn-peligro:hover{background:#7b332c}

/* Nota de referencia */
#estructura-app .est-nota{margin:0 0 24px;padding:14px 18px;border:1px solid var(--t-gold-3);border-left:4px solid var(--t-gold);border-radius:6px;background:#fbf6ec;font-size:14.5px;line-height:1.6;color:var(--t-ink)}
#estructura-app .est-nota b{color:var(--t-navy)}
#estructura-app .est-print-head{display:none}

/* Distribución */
#estructura-app .est-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}
#estructura-app .est-mapa{min-width:0;grid-column:1;grid-row:1}
#estructura-app .est-panel{grid-column:2;grid-row:1}

/* Barras */
#estructura-app .est-bar{display:block;height:6px;border-radius:6px;background:#ece9e0;overflow:hidden}
#estructura-app .est-bar i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,var(--t-gold-3),var(--t-gold));transition:width .35s ease}

/* Panel de avance sobre mármol azul */
#estructura-app .est-panel{color:#e9e4d8;border-radius:10px;padding:22px 20px 20px;background-color:var(--t-navy);background-image:linear-gradient(160deg,#102f43e6,#0b2333f0),url('textures/marble-navy-real.jpg');background-size:auto,520px;border:1px solid #1f4a63;box-shadow:0 14px 40px #102f4324}
#estructura-app .est-panel .t-label{color:var(--t-gold-3)}
#estructura-app .est-general{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin:0 0 10px}
#estructura-app .est-general-pct{font:500 40px/1 Newsreader,Georgia,serif;color:#fff;letter-spacing:-.02em}
#estructura-app .est-general-txt{font-size:13px;color:#c9cfd1}
#estructura-app .est-panel .est-bar{background:#ffffff1f}

/* Columna: un tambor por capítulo, de la base hacia el capitel */
#estructura-app .est-edificio{margin:22px 0 20px;display:flex;flex-direction:column;align-items:stretch}
#estructura-app .est-fila{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;column-gap:12px}
#estructura-app .est-fila>span:first-child{grid-column:1;justify-self:center}
#estructura-app .est-fronton{width:132px;height:20px;background:linear-gradient(#d8bd85,#a17b3d);clip-path:polygon(50% 0,100% 100%,0 100%);opacity:.35;transition:opacity .4s}
#estructura-app .est-edificio.completo .est-fronton{opacity:1}
#estructura-app .est-capitel{width:132px;height:9px;margin:1px 0 3px;background:#e9e4d8;border-radius:1px;box-shadow:inset 0 -2px 0 #ffffff40}
#estructura-app .est-basa{width:124px;height:8px;margin-top:3px;background:#e9e4d8;border-radius:1px}
#estructura-app .est-estilobato{width:140px;height:7px;margin-top:2px;background:#cfc7b6;border-radius:1px}
#estructura-app .est-piso{margin-top:3px}
#estructura-app .est-tambor{position:relative;display:block;width:100px;height:24px;overflow:hidden;border-radius:2px;background:#ffffff14;border:1px solid #d8bd8559}
#estructura-app .est-tambor::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(90deg,#00000024 0 1px,transparent 1px 12.5px);pointer-events:none}
#estructura-app .est-relleno{position:absolute;left:0;right:0;bottom:0;height:0;background:linear-gradient(90deg,#a17b3d,#d8bd85 45%,#c6a05a);transition:height .4s ease}
#estructura-app .est-piso.completo .est-tambor{border-color:#d8bd85}
#estructura-app .est-piso-et{display:flex;justify-content:space-between;gap:8px;font:500 12px/1 var(--t-mono);color:#c9cfd1;min-width:0}
#estructura-app .est-piso-et b{font-weight:500;color:#fff}
#estructura-app .est-piso.completo .est-piso-pct{color:var(--t-gold-3)}

/* Siguiente pendiente */
#estructura-app .est-siguiente{display:flex;flex-direction:column;gap:5px;padding:16px;border-radius:8px;background:#ffffff12;border:1px solid #d8bd8566}
#estructura-app .est-sig-k{font:500 11px/1.4 var(--t-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--t-gold-3)}
#estructura-app .est-sig-cap{font-size:13px;color:#c9cfd1;line-height:1.45}
#estructura-app .est-sig-ap{font:500 19px/1.3 Newsreader,Georgia,serif;color:#fff}
#estructura-app .est-siguiente .btn{margin-top:8px;align-self:flex-start;min-height:38px}
#estructura-app .est-siguiente.fin{border-color:var(--t-gold-3);background:#d8bd851f}

/* Capítulos plegables */
#estructura-app details.est-cap{border:1px solid var(--t-line);border-radius:8px;background:#fff;margin:0 0 10px;padding:0;transition:border-color .15s}
#estructura-app details.est-cap[open]{border-color:var(--t-gold-3)}
#estructura-app details.est-cap>summary{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 46px 14px 14px;position:relative;cursor:pointer;list-style:none;font-weight:600;font-size:16px;color:var(--t-navy)}
#estructura-app details.est-cap>summary::-webkit-details-marker{display:none}
#estructura-app details.est-cap>summary::after{content:'+';position:absolute;right:16px;top:50%;transform:translateY(-50%);font:400 22px/1 Newsreader,Georgia,serif;color:var(--t-gold)}
#estructura-app details.est-cap[open]>summary::after{content:'−'}
#estructura-app details.est-cap>summary:hover .est-cap-tit{color:var(--t-gold)}
#estructura-app details.est-cap>summary:focus-visible{outline:2px solid var(--t-gold);outline-offset:-2px;border-radius:8px}
#estructura-app .est-cap-num{display:inline-flex;align-items:center;justify-content:center;width:52px;padding:0 4px;white-space:nowrap;height:34px;border-radius:5px;background:var(--t-navy);color:var(--t-gold-3);font:500 13px/1 var(--t-mono)}
#estructura-app details.completo .est-cap-num{background:linear-gradient(135deg,#c6a05a,#a17b3d);color:#fff}
#estructura-app .est-cap-tit{font:500 20px/1.2 Newsreader,Georgia,serif;letter-spacing:-.01em;min-width:0}
#estructura-app .est-cap-meta{display:flex;align-items:center;gap:10px}
#estructura-app .est-cap-cuenta{font:500 12px/1 var(--t-mono);color:var(--t-muted);white-space:nowrap}
#estructura-app .est-bar-cap{width:90px}
#estructura-app .est-cap-extra{background:#fbfaf6}
#estructura-app .est-cap-extra .est-cap-num{background:#fff;border:1px solid var(--t-gold-3);color:var(--t-gold)}
#estructura-app .est-cap-intro{margin:0;padding:0 18px 4px 78px;font-size:13.5px;color:var(--t-muted);line-height:1.55}

/* Apartados */
#estructura-app .est-aps{list-style:none;margin:0;padding:4px 18px 16px 78px;display:grid;gap:10px}
#estructura-app .est-ap{border-top:1px solid #ecebe4;padding:14px 0 4px;scroll-margin-top:110px;border-radius:4px;transition:background-color .3s,box-shadow .3s}
#estructura-app .est-ap:first-child{border-top:0}
#estructura-app .est-ap.resalta{background:#fbf6ec;box-shadow:0 0 0 8px #fbf6ec}
#estructura-app .est-ap-tit{display:flex;align-items:baseline;gap:10px;margin:0 0 6px;font:600 16px/1.35 'Segoe UI',system-ui,sans-serif;letter-spacing:0;color:var(--t-navy)}
#estructura-app .est-ap-num{font:500 12px/1 var(--t-mono);color:var(--t-gold);flex:none}
#estructura-app .est-ap-desc{margin:0 0 8px;font-size:14.5px;line-height:1.6;color:#33454f;max-width:68ch}
#estructura-app .est-ap-error{margin:0 0 10px;padding:8px 12px;border-left:2px solid #c9a6a0;background:#faf6f4;font-size:13.5px;line-height:1.55;color:#5c4a46;max-width:68ch;border-radius:0 4px 4px 0}
#estructura-app .est-ap-error-k{display:block;font:500 10.5px/1.4 var(--t-mono);letter-spacing:.1em;text-transform:uppercase;color:#93564b;margin-bottom:2px}
#estructura-app .est-ap-pie{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px}
#estructura-app .est-check{display:inline-flex;align-items:center;gap:9px;min-height:36px;padding:4px 12px 4px 10px;border:1px solid var(--t-line);border-radius:30px;cursor:pointer;font-size:13.5px;font-weight:600;color:var(--t-ink);background:#fff;transition:border-color .15s,background-color .15s}
#estructura-app .est-check:hover{border-color:var(--t-gold-3)}
#estructura-app .est-check input,#estructura-app .est-verif-item input{width:18px;height:18px;margin:0;accent-color:var(--t-gold);flex:none;cursor:pointer}
#estructura-app .est-ap.listo .est-check{background:#f6efe0;border-color:var(--t-gold-3);color:#6b5022}
#estructura-app .est-ap.listo .est-ap-tit{color:#6b5022}
#estructura-app .est-ayuda{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:13px}
#estructura-app .est-ayuda-k{color:var(--t-muted)}
#estructura-app .est-link{color:var(--t-navy);font-weight:600;text-decoration:none;border-bottom:1px solid var(--t-gold-3)}
#estructura-app .est-link:hover{color:var(--t-gold);border-color:var(--t-gold)}

/* Antes de entregar a tu asesor */
#estructura-app .est-verif{margin:22px 0 14px;padding:22px;border:1px solid var(--t-line);border-radius:8px;background:#faf9f5}
#estructura-app .est-verif-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
#estructura-app .est-verif-head h3{margin:0;font:500 24px/1.2 Newsreader,Georgia,serif;color:var(--t-navy);letter-spacing:-.01em}
#estructura-app .est-verif-cuenta{font:500 13px/1 var(--t-mono);color:var(--t-gold)}
#estructura-app .est-verif-intro{margin:8px 0 12px;font-size:14px;line-height:1.55;color:var(--t-muted)}
#estructura-app .est-verif-lista{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#estructura-app .est-verif-item{display:flex;gap:11px;align-items:flex-start;height:100%;padding:12px 14px;border:1px solid var(--t-line);border-radius:6px;background:#fff;cursor:pointer;font-size:13.5px;line-height:1.5;color:#44545c;transition:border-color .15s,background-color .15s}
#estructura-app .est-verif-item input{margin-top:2px}
#estructura-app .est-verif-item b{display:block;font-size:14px;color:var(--t-navy);margin-bottom:2px}
#estructura-app .est-verif-item:hover{border-color:var(--t-gold-3)}
#estructura-app .est-verif-item.listo{background:#f6efe0;border-color:var(--t-gold-3)}

/* Escritorio con altura suficiente: el panel acompaña el desplazamiento */
@media (min-width:901px) and (min-height:760px){
  #estructura-app .est-panel{position:sticky;top:96px}
}

/* Tableta y móvil */
@media (max-width:900px){
  #estructura-app .est-layout{grid-template-columns:minmax(0,1fr);gap:20px}
  #estructura-app .est-panel,#estructura-app .est-mapa{grid-column:1;grid-row:auto}
  #estructura-app .est-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px;align-items:start}
  #estructura-app .est-panel>.t-label,#estructura-app .est-general,#estructura-app .est-bar-general{grid-column:1 / -1}
  #estructura-app .est-edificio{margin-bottom:0}
  #estructura-app .est-siguiente{margin-top:22px}
}
@media (max-width:600px){
  #estructura-app .est-top{flex-direction:column;align-items:stretch}
  #estructura-app .est-chips .t-chip{flex:1 1 auto;justify-content:center;text-align:center}
  #estructura-app .est-acciones .btn{flex:1 1 auto;padding:9px 10px}
  #estructura-app .est-panel{display:block;padding:18px 16px}
  #estructura-app .est-general-pct{font-size:34px}
  #estructura-app .est-edificio{margin:18px 0}
  #estructura-app .est-fila{grid-template-columns:100px minmax(0,1fr)}
  #estructura-app .est-tambor{width:88px;height:19px}
  #estructura-app .est-fronton,#estructura-app .est-capitel{width:116px}
  #estructura-app .est-basa{width:108px}
  #estructura-app .est-estilobato{width:122px}
  #estructura-app .est-siguiente{margin-top:0}
  #estructura-app details.est-cap>summary{grid-template-columns:46px minmax(0,1fr);gap:4px 10px;padding:12px 40px 12px 12px}
  #estructura-app details.est-cap>summary::after{right:13px}
  #estructura-app .est-cap-num{width:46px;height:30px;padding:0 4px;font-size:11.5px;grid-row:span 2;align-self:start}
  #estructura-app .est-cap-tit{font-size:18px}
  #estructura-app .est-cap-meta{grid-column:2}
  #estructura-app .est-bar-cap{flex:1;max-width:140px}
  #estructura-app .est-aps{padding:0 14px 14px}
  #estructura-app .est-cap-intro{padding:0 14px 4px}
  #estructura-app .est-ap-pie{align-items:flex-start;flex-direction:column}
  #estructura-app .est-verif{padding:16px 14px}
  #estructura-app .est-verif-head h3{font-size:21px}
  #estructura-app .est-verif-lista{grid-template-columns:minmax(0,1fr)}
}

@media (prefers-reduced-motion:reduce){
  #estructura-app .est-bar i,#estructura-app .est-relleno,#estructura-app .est-ap{transition:none}
}

/* Impresión del esquema: solo con «Imprimir mi esquema» (clase en <html> puesta por el JS). */
@media print{
  html.estructura-imprimiendo body *:not(:has(#estructura-app)):not(#estructura-app):not(#estructura-app *){display:none!important}
  html.estructura-imprimiendo body,html.estructura-imprimiendo main,html.estructura-imprimiendo #estructura,html.estructura-imprimiendo #estructura .container{background:#fff!important;padding:0!important;margin:0!important;width:auto!important;max-width:none!important}
  html.estructura-imprimiendo #estructura-app{padding:0!important;border:0!important;box-shadow:none!important;min-height:0;font-size:10.5pt;color:#000}
  html.estructura-imprimiendo #estructura-app .est-top,
  html.estructura-imprimiendo #estructura-app .est-confirm,
  html.estructura-imprimiendo #estructura-app .est-panel,
  html.estructura-imprimiendo #estructura-app .est-cap-extra,
  html.estructura-imprimiendo #estructura-app .est-ayuda,
  html.estructura-imprimiendo #estructura-app .est-bar,
  html.estructura-imprimiendo #estructura-app .est-cap-num,
  html.estructura-imprimiendo #estructura-app details.est-cap>summary::after{display:none!important}
  html.estructura-imprimiendo #estructura-app .est-print-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:12px;border-bottom:1px solid #999;padding-bottom:6px;margin-bottom:10px;font-size:9.5pt;color:#333}
  html.estructura-imprimiendo #estructura-app .est-print-head b{font:600 15pt Georgia,serif;color:#000}
  html.estructura-imprimiendo #estructura-app .est-nota{background:none;border:1px solid #999;font-size:9.5pt;margin-bottom:12px;padding:6px 10px}
  html.estructura-imprimiendo #estructura-app .est-layout{display:block}
  html.estructura-imprimiendo #estructura-app details.est-cap{border:0;border-top:1px solid #999;border-radius:0;margin:0;padding:6px 0 2px}
  html.estructura-imprimiendo #estructura-app details.est-cap>summary{display:flex;padding:0;gap:8px;color:#000;break-after:avoid}
  html.estructura-imprimiendo #estructura-app .est-cap-num{width:auto;height:auto;background:none!important;color:#000!important;font-weight:600}
  html.estructura-imprimiendo #estructura-app .est-cap-tit{font:600 13pt Georgia,serif;color:#000}
  html.estructura-imprimiendo #estructura-app .est-aps{padding:2px 0 6px 18px;gap:0}
  html.estructura-imprimiendo #estructura-app .est-ap{break-inside:avoid;padding:5px 0 3px;border-top:1px dotted #ccc}
  html.estructura-imprimiendo #estructura-app .est-ap-tit{font-size:10.5pt;color:#000;margin-bottom:2px}
  html.estructura-imprimiendo #estructura-app .est-ap-num{color:#000}
  html.estructura-imprimiendo #estructura-app .est-ap-desc{font-size:9.5pt;color:#222;margin-bottom:2px;max-width:none}
  html.estructura-imprimiendo #estructura-app .est-ap-error{background:none;border-left:1px solid #999;padding:0 0 0 8px;font-size:9pt;color:#333;margin-bottom:3px;max-width:none}
  html.estructura-imprimiendo #estructura-app .est-ap-error-k{display:inline;margin-right:6px;color:#333}
  html.estructura-imprimiendo #estructura-app .est-check{border:0;padding:0;min-height:0;background:none!important;font-size:9pt;color:#000!important}
  html.estructura-imprimiendo #estructura-app .est-check input,html.estructura-imprimiendo #estructura-app .est-verif-item input{width:12px;height:12px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  html.estructura-imprimiendo #estructura-app .est-verif{break-inside:avoid;background:none;border:1px solid #999;border-radius:0;padding:8px 12px;margin-top:12px}
  html.estructura-imprimiendo #estructura-app .est-verif-head h3{font:600 13pt Georgia,serif;color:#000}
  html.estructura-imprimiendo #estructura-app .est-verif-intro{font-size:9pt;color:#333;margin:4px 0}
  html.estructura-imprimiendo #estructura-app .est-verif-lista{gap:4px 14px;margin-top:6px}
  html.estructura-imprimiendo #estructura-app .est-verif-item{border:0;padding:2px 0;background:none!important;font-size:9pt;color:#222}
  html.estructura-imprimiendo #estructura-app .est-verif-item b{font-size:9.5pt;color:#000}
}
