/* Geospatial Intelligence: Ask the Map panel. Tokens come from geo.css; orange only on the Ask button (.btn.go). */
.ask{display:flex;flex-direction:column;gap:20px;min-width:0}
.ask-head h2{font-size:var(--fs-3)}
.ask-head p{margin:8px 0 0;color:var(--muted)}
.ask-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.ask-form{display:flex;flex-direction:column;gap:8px}
.ask-form textarea{display:block;width:100%;min-height:96px;max-height:220px;resize:vertical;padding:12px 14px;border:1px solid var(--muted);border-radius:var(--radius);background:var(--surface);color:var(--text);font:400 var(--fs-1)/1.45 var(--font)}
.ask-form textarea::placeholder{color:var(--muted);opacity:1}
.ask-form textarea[readonly]{background:var(--surface-2)}
.ask-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ask-count{color:var(--muted);font-size:var(--fs-0)}
.ask-row .btn{min-width:112px}
.ask-left{margin:0;color:var(--muted);font-size:var(--fs-0)}

.ask-progress{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-size:var(--fs-0)}
.ask-bar{position:relative;display:block;height:4px;border-radius:2px;background:var(--surface-2);overflow:hidden}
.ask-bar::after{content:"";position:absolute;top:0;bottom:0;left:-35%;width:35%;border-radius:2px;background:var(--accent);animation:ask-slide 1.6s ease-in-out infinite}
@keyframes ask-slide{to{left:100%}}
@media (prefers-reduced-motion:reduce){.ask-bar::after{animation:none;left:0;width:100%;opacity:.45}}

.ask-card{display:flex;flex-direction:column;gap:12px;min-width:0;padding:16px;border-radius:var(--radius);background:var(--surface-2)}
.ask-card h3{margin:0;font-size:var(--fs-2);line-height:1.2}
.ask-card p{margin:0}
.ask-answer{font-size:var(--fs-1);line-height:1.5}
.ask-note{color:var(--muted);font-size:var(--fs-0);line-height:1.4}
.ask-err p{color:var(--text)}

.ask-tablewrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.ask-tablewrap.tall{max-height:360px}
.ask-tablewrap table{width:100%;border-collapse:collapse;font-size:var(--fs-0);line-height:1.35}
.ask-tablewrap th{position:sticky;top:0;background:var(--surface);padding:8px 10px;text-align:left;font-weight:400;color:var(--muted);border-bottom:1px solid var(--line);white-space:nowrap}
.ask-tablewrap td{padding:8px 10px;border-top:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.ask-tablewrap tbody tr:first-child td{border-top:0}
.ask-tablewrap th.n,.ask-tablewrap td.n{text-align:right;white-space:nowrap}
.ask-tfoot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:var(--fs-0)}
.ask-link{min-height:44px;padding:0;border:0;background:none;color:var(--accent);font-weight:400;font-size:var(--fs-0);text-decoration:underline;text-underline-offset:3px;cursor:pointer}

.ask-query summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-weight:700;font-size:var(--fs-1);color:var(--accent);list-style:none}
.ask-query summary::-webkit-details-marker{display:none}
.ask-query summary::before{content:"";width:8px;height:8px;margin-right:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.ask-query[open] summary::before{transform:rotate(45deg)}
@media (prefers-reduced-motion:reduce){.ask-query summary::before{transition:none}}
.ask-query pre{margin:4px 0 8px;padding:12px 14px;overflow:auto;max-height:260px;border-radius:var(--radius);background:var(--navy);color:#EEF1FA;border:1px solid var(--line)}
.ask-query code{font:400 .875rem/1.5 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere}

.ask-ex h3{margin:0 0 4px;font-size:var(--fs-1);font-weight:700}
.ask-ex ul{list-style:none;margin:0;padding:0}
.ask-ex li+li button,.ask-ex li:first-child button{border-top:1px solid var(--line)}
.ask-ex li:last-child button{border-bottom:1px solid var(--line)}
.ask-ex button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:12px 2px;border:0;background:none;color:var(--accent);text-align:left;font-weight:400;font-size:var(--fs-1);line-height:1.35;cursor:pointer}
.ask-ex button:hover span{text-decoration:underline;text-underline-offset:3px}
.ask-ex button svg{flex:none;width:18px;height:18px}
.ask-ex button:disabled{opacity:.6;cursor:progress}

@media (max-width:820px){
  .ask{gap:16px}
  .ask-head h2{font-size:var(--fs-2)}
}
