.utility-nav {
  min-width: 38px;
  padding: .55rem .7rem;
  border: 1px solid #315f77;
  color: #e8f8ff;
  font-size: 1.05rem;
}

#global-search-button { font-size: 0; }
#global-search-button::before { content: "🔍"; font-size: 1rem; }
#ai-help-button{font-size:.78rem;font-weight:900;color:#7fe1ee}

.utility-dialog {
  width: min(760px, 94vw);
  max-height: 85vh;
  padding: 1.4rem;
  overflow: auto;
}

.utility-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.utility-dialog-head h2 { margin: 0; }
.utility-dialog-head .close { padding: .25rem .55rem; }
.question-dialog{width:min(560px,94vw)}
.question-dialog form{margin:0}
.question-message{white-space:pre-line;line-height:1.5;margin:.35rem 0 1rem}
.question-input-wrap{display:grid;gap:.4rem;font-weight:800}
.question-input-wrap input{width:100%}
.question-dialog .danger{background:var(--red);color:#fff}
#global-search-input { width: 100%; font-size: 1.05rem; }
.global-search-results { display: grid; gap: .5rem; margin-top: 1rem; }
.search-result {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: .15rem .8rem;
  width: 100%;
  padding: .8rem;
  text-align: left;
  border: 1px solid var(--line);
  background: #f3f7f8;
  color: var(--ink);
}
.search-result:hover { border-color: var(--blue); background: #e9f4f9; }
.search-result small { grid-row: 1 / 3; align-self: center; color: var(--blue); font-weight: 800; text-transform: uppercase; }
.search-result b { font-size: 1rem; }
.search-result span { color: var(--muted); font-size: .8rem; }
.help-content { line-height: 1.55; }
.help-content p { margin-top: 0; }
.help-content li { margin-bottom: .65rem; }
.ai-help-messages{display:grid;gap:.7rem;max-height:48vh;overflow:auto;margin:1rem 0;padding:.8rem;border-radius:10px;background:#eef4f7}.ai-help-question,.ai-help-answer{max-width:88%;padding:.75rem .9rem;border-radius:10px;white-space:pre-wrap;line-height:1.45}.ai-help-question{justify-self:end;background:var(--blue);color:#fff}.ai-help-answer{justify-self:start;background:#fff;border:1px solid var(--line)}.ai-help-form{display:flex;gap:.6rem}.ai-help-form input{flex:1;min-width:0}
.ai-help-unavailable{border-color:var(--amber);background:#fff8e8}

.natural-report {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #b9d9e8;
  border-left: 5px solid var(--cyan);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.natural-report>div { display:flex; gap:.6rem; margin-top:.55rem; }
.natural-report input { flex:1; min-width:0; }
.natural-report p { margin:.55rem 0 0; }
.saved-report small { margin-left:.35rem; color:var(--muted); font-size:.58rem; }
.saved-report.is-public { border:1px solid #72b89d; background:#e5f5ee; }
.saved-report.is-public small { padding:.15rem .35rem; border-radius:10px; background:#d6f2e5; color:var(--green); font-weight:900; }
.saved-report.is-personal small { color:#74838b; }
.share-toggle { display:flex; gap:.6rem; align-items:flex-start; margin:1rem 0; padding:.8rem; border-radius:8px; background:#edf5f8; font-weight:700; }
.share-toggle input { margin-top:.15rem; }
td.positive { color:var(--green); font-weight:800; }

@media(max-width:700px){
  .search-result { grid-template-columns: 1fr; }
  .search-result small { grid-row: auto; }
  .natural-report>div { flex-direction:column; }
  .ai-help-form{flex-direction:column}.ai-help-question,.ai-help-answer{max-width:96%}
}
