/* Pillán360 10.8.31 · ficha comunal avanzada; alto contraste y sin alterar otros módulos. */
#territorial-profile-10831{margin:1.05rem 0 0;border-top:1px solid var(--border);padding-top:1rem;min-width:0}
.tp31-top{display:flex;flex-wrap:wrap;gap:.7rem;align-items:flex-start;justify-content:space-between;margin-bottom:.75rem}
.tp31-top h5{font-size:.98rem;font-weight:850;color:var(--text-main)}
.tp31-top p{font-size:.74rem;color:var(--text-sub);line-height:1.5;max-width:52rem;margin-top:.2rem}
.tp31-actions{display:flex;gap:.45rem;flex-wrap:wrap}
.tp31-actions button,.tp31-go{border:1px solid var(--border);border-radius:.52rem;padding:.5rem .65rem;background:var(--card-bg);color:var(--text-main);font-size:.74rem;font-weight:750;cursor:pointer;min-height:36px}
.tp31-actions button:hover,.tp31-go:hover{border-color:var(--accent);text-decoration:underline}
.tp31-actions button:disabled{cursor:not-allowed;opacity:.5}
.tp31-actions button:focus-visible,.tp31-go:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.tp31-scope{font-size:.77rem;color:var(--text-main);display:flex;flex-wrap:wrap;gap:.5rem 1.3rem;margin-bottom:.8rem}
.tp31-scope strong{font-weight:850}
.tp31-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}
.tp31-card{border:1px solid var(--border);border-radius:.7rem;padding:.8rem;background:var(--card-bg);min-width:0;display:flex;flex-direction:column;gap:.45rem}
.tp31-card[data-state="available"]{border-inline-start:4px solid #16846a}
.tp31-card[data-state="reference"]{border-inline-start:4px solid #426dc2}
.tp31-card[data-state="pending"]{border-inline-start:4px solid #8a6a29}
.tp31-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:.4rem}
.tp31-head h6{font-size:.83rem;font-weight:850;color:var(--text-main)}
.tp31-state{font-size:.66rem;border:1px solid var(--border);border-radius:999px;padding:.18rem .45rem;font-weight:750;color:var(--text-main)}
.tp31-message{font-size:.82rem;font-weight:700;color:var(--text-main);line-height:1.45;overflow-wrap:anywhere}
.tp31-detail{font-size:.7rem;color:var(--text-sub);line-height:1.45;overflow-wrap:anywhere}
.tp31-meta{display:grid;grid-template-columns:3.3rem minmax(0,1fr);gap:.25rem .4rem;font-size:.69rem;border-top:1px solid var(--border);padding-top:.55rem;margin-top:auto}
.tp31-meta dt{font-weight:750;color:var(--text-sub)}
.tp31-meta dd{color:var(--text-main);overflow-wrap:anywhere}
.tp31-go{align-self:flex-start;margin-top:.35rem}
.tp31-foot{font-size:.7rem;line-height:1.5;color:var(--text-sub);margin-top:.85rem}
body.light-mode #territorial-profile-10831 .tp31-actions button,body.light-mode #territorial-profile-10831 .tp31-go{background:#fff;color:#111827;border-color:#4b5563}
body.light-mode #territorial-profile-10831 .tp31-state{color:#111827;border-color:#4b5563}
@media(max-width:1000px){.tp31-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.tp31-grid{grid-template-columns:1fr}.tp31-actions{width:100%}.tp31-actions button{flex:1}}
@media print{.commune-summary{display:block!important}.commune-summary>summary{display:flex!important}.commune-summary-body{display:block!important}.tp31-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}.tp31-actions,.tp31-go{display:none!important}.tp31-card{break-inside:avoid}}
