/* Tools chart pop-out (#3911). Uses the page's theme tokens only (--panel/--card/--border/
   --text/--muted/--accent), so html.night-mode re-themes it with no rules of its own.
   The Tools header button reuses the Map button's .nav-map-btn look. */

.tc-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.tc-backdrop[hidden] { display: none; }
.tc-panel { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  width: 100%; max-width: 1040px; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 16px; align-items: start; }
.tc-card { border: 1px solid var(--border); border-radius: 8px; background: var(--card); padding: 10px; }
.tc-card h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.tc-tile { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; margin-top: 6px;
  padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel);
  color: var(--text); font: inherit; cursor: pointer; }
.tc-tile:hover, .tc-tile:focus-visible { border-color: var(--accent); outline: none; }
.tc-icon { flex: 0 0 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card); font-size: 18px; line-height: 1; }
.tc-icon img, .tc-icon svg { width: 18px; height: 18px; display: block; }
.tc-text { display: flex; flex-direction: column; min-width: 0; }
.tc-name { font-weight: 600; font-size: 13px; }
.tc-desc { font-size: 12px; color: var(--muted); line-height: 1.3; }

/* Phone width: the pop-out takes the whole screen, one column. */
@media (max-width: 600px) {
  .tc-backdrop { padding: 0; }
  .tc-panel { max-width: none; min-height: 100%; border-radius: 0; border: 0; }
  .tc-grid { grid-template-columns: 1fr; padding: 12px; }
}
