.gs-priority-v05 { margin-top:14px; padding:12px; border:1px solid #42786d; border-radius:10px; background:#0b2530; color:#e8fff8; font:12px/1.5 system-ui,sans-serif; }
.gs-priority-v05 summary { cursor:pointer; font-weight:700; color:#71e5ca; }
.gs-priority-v05 label { display:block; margin:10px 0; }
.gs-priority-v05 input,.gs-priority-v05 textarea { display:block; box-sizing:border-box; width:100%; color:#effffb; background:#102f3d; border:1px solid #6b9690; border-radius:5px; padding:7px; }
.gs-priority-v05 button { padding:8px; margin-top:8px; border:1px solid #65bbaa; border-radius:7px; background:#174a49; color:#effffb; cursor:pointer; }
.gs-priority-v05 button:disabled { opacity:.5; cursor:not-allowed; }
.gs-priority-actions { display:flex; gap:8px; flex-wrap:wrap; }
.gs-priority-table { max-height:300px; overflow:auto; }
.gs-priority-table th,.gs-priority-table td { padding:6px; text-align:left; border-bottom:1px solid #42786d; overflow-wrap:anywhere; }
.gs-priority-explanation { margin-top:12px; border-top:1px solid #42786d; }
.gs-priority-v05 pre { white-space:pre-wrap; overflow-wrap:anywhere; }
.gs-priority-ranking { display:block; width:100%; }
.gs-priority-ranking tr:first-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.gs-priority-ranking tr[data-priority-object] { display:grid; grid-template-columns:1fr 1fr; padding:8px 0; border-bottom:1px solid #42786d; }
.gs-priority-ranking td { border:0; padding:3px; }
.gs-priority-ranking td:nth-child(1),.gs-priority-ranking td:nth-child(4),.gs-priority-ranking td:nth-child(5) { grid-column:1 / -1; }
.gs-priority-ranking td:nth-child(2),.gs-priority-ranking td:nth-child(3) { white-space:nowrap; }
.gs-priority-ranking td:nth-child(2)::before { content:'Score relativo / 100: '; }
.gs-priority-ranking td:nth-child(3)::before { content:'Clase: '; }
.gs-priority-ranking button { margin-top:2px; }
.gs-priority-components { min-width:540px; table-layout:auto; }
.gs-priority-components th { white-space:nowrap; }
.gs-priority-components td:first-child { min-width:125px; overflow-wrap:normal; }
.gs-priority-components td:not(:first-child) { white-space:nowrap; }
/* Raw evidence field names must not overlap their values in the native inspector. */
#gsV5430FeatureInspector .fi-key, #gsV5430FeatureInspector .fi-val { min-width:0; overflow-wrap:anywhere; }

/* V1.2: one presentation for point profiles and the separate H1 model. */
.gs-priority-v05 { min-width:0; color:var(--ts-text,#e5ecec); background:var(--ts-surface,#172126); border-color:var(--ts-border,#3d5056); border-radius:var(--ts-radius,10px); }
.gs-priority-v05 summary { color:var(--ts-text,#e5ecec); padding:5px 0; overflow-wrap:anywhere; }
.gs-priority-v05 h3 { font-size:14px; margin:12px 0 6px; }
.gs-priority-v05 h4 { font-size:12px; margin:10px 0 5px; }
.gs-priority-v05 p { margin:8px 0; line-height:1.5; }
.gs-priority-v05 details { min-width:0; margin-top:10px; }
.gs-priority-v05 input,.gs-priority-v05 textarea,.gs-priority-v05 select { box-sizing:border-box; width:100%; max-width:100%; min-width:0; color:var(--ts-text,#e5ecec); background:var(--ts-surface-2,#202d32); border:1px solid var(--ts-border,#53676d); border-radius:6px; padding:8px; font:inherit; }
.gs-priority-v05 select { display:block; margin-top:5px; }
.gs-priority-v05 button { color:var(--ts-text,#e5ecec); background:var(--ts-surface-2,#202d32); border-color:var(--ts-border,#53676d); min-height:36px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.gs-priority-v05 [data-profiles="run"],.gs-priority-v05 [data-priority="run"] { border-color:var(--ts-brand,#64c7b6); font-weight:700; }
.gs-priority-v05 :is(button,input,textarea,select,summary):focus-visible { outline:2px solid var(--ts-brand,#64c7b6); outline-offset:3px; }
.gs-priority-v05 button:not(:disabled):hover { border-color:var(--ts-brand,#64c7b6); }
.gs-priority-v05 [role="status"] { color:var(--ts-muted,#bccccc); }
.ts-priority-factors { list-style:none; padding:0; margin:8px 0; }
.ts-priority-factors li { margin:5px 0; }
.ts-priority-warning { border-left:2px solid var(--ts-brand,#64c7b6); padding-left:9px; }
.ts-priority-counts { display:flex; gap:6px; flex-wrap:wrap; }
.ts-priority-counts span { border:1px solid var(--ts-border,#53676d); padding:4px 6px; border-radius:5px; }
.ts-priority-ranking { max-height:240px; overflow:auto; padding-left:24px; }
.ts-priority-ranking button { width:100%; text-align:left; }
.ts-priority-profiles > #gsPriorityV05 { padding:10px; border-style:dashed; }
.gs-priority-explanation { border-color:var(--ts-border,#53676d); }
.gs-priority-v05 pre { max-width:100%; max-height:320px; overflow:auto; padding:8px; background:var(--ts-surface-2,#202d32); }
@media(max-width:420px){.gs-priority-v05 { padding:8px; }.gs-priority-ranking tr[data-priority-object] { grid-template-columns:1fr; }.gs-priority-ranking td { grid-column:1!important; white-space:normal!important; }}

/* Same Priority body inside each native inspector; never a second popup. */
.ts-priority-point-inspector { margin:0; padding:8px; border:0; font-size:12px; overflow-wrap:anywhere; }
.ts-priority-point-inspector .gs-wl-inspector h3 { font-size:13px; }
.ts-priority-point-inspector .gs-wl-popup-key,.ts-priority-point-inspector .gs-wl-popup-val { color:inherit; white-space:normal; }
.ts-priority-point-inspector dl { margin:8px 0; }
.ts-priority-point-inspector dd { margin:0 0 6px; }
/* A disclosure changes height after Leaflet's initial measurement. Keep it scrollable. */
.gs-wl-popup .leaflet-popup-content:has(.ts-priority-point-inspector) { max-width:calc(100vw - 72px); max-height:var(--priority-popup-height,min(520px,65vh)); overflow:auto; }
/* Give the point explanation the small map viewport while it is open. The
   legend returns unchanged on close; no layer/persistence state is toggled. */
@media(max-width:900px){body.ts-remote:has(.leaflet-popup .ts-priority-point-inspector) #legend { display:none!important; }}
