/* =============================================================================
   Grant Review (hub-grant-review.js). Only what has no shared equivalent; cards,
   buttons, banners and hints come from the Hub's own classes. Every selector is
   rooted at .hub-gr so nothing here can reach another page.
   ============================================================================= */

.hub-gr .hub-gr-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.hub-gr .hub-gr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}
/* this form's own inputs, drawn as the Hub's text control */
.hub-gr .hub-gr-field input,
.hub-gr .hub-gr-field select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #8b95a5;
  border-radius: var(--r);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}
.hub-gr .hub-gr-field input:focus,
.hub-gr .hub-gr-field select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(7, 29, 51, .14);
}
.hub-gr .hub-gr-controls .hub-btn { min-height: 40px; }
/* how to answer: one quiet callout at the top, not a card */
.hub-gr .hub-gr-intro {
  position: relative;
  padding: 14px 18px 14px 46px;
  border: 0;
  border-radius: 10px;
  background: #f5f7fa;
}
.hub-gr .hub-gr-intro::before {
  content: "i";
  position: absolute; left: 16px; top: 15px;
  display: grid; place-items: center; width: 18px; height: 18px;
  border: 1.5px solid var(--text3); border-radius: 50%;
  font: 700 11px/1 var(--font); color: var(--text3);
}
.hub-gr .hub-gr-intro .hub-hint { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: #344256; }
/* the count line and its meter: fully answered in teal, partly in amber, the rest the track */
.hub-gr .hub-gr-count { margin: 8px 0 0; font-size: 13.5px; color: var(--text2); }
.hub-gr .hub-gr-meter {
  display: flex; width: min(560px, 100%); height: 6px; margin: 10px 0 18px;
  overflow: hidden; border-radius: 999px; background: #eef1f5;
}
.hub-gr .hub-gr-meter-full { background: var(--accent-2); }
.hub-gr .hub-gr-meter-part { background: #d97706; }
.hub-gr .hub-gr-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
/* one consultation per row on a rule: heading, the description, then the two questions
   side by side with Save at the right */
.hub-gr .hub-gr-row {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: end;
  gap: 0 32px;
  padding: 22px 4px 22px;
}
.hub-gr .hub-gr-row > .hub-card-head { grid-column: 1 / -1; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 0; }
.hub-gr .hub-gr-row .hub-card-title { font-size: 15px; }
.hub-gr .hub-gr-date { margin-right: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent-2); }
.hub-gr .hub-gr-dash { display: none; }
.hub-gr .hub-gr-row > .hub-actions { grid-column: 3; justify-self: end; margin: 0; }
/* The description is what the supervisor decides from, so it keeps its own line
   breaks and scrolls rather than pushing the questions off the screen. */
.hub-gr .hub-gr-desc {
  grid-column: 1 / -1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 14rem;
  overflow-y: auto;
  max-width: 78ch;
  margin: 14px 0 16px;
  padding: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-900);
}
.hub-gr .hub-gr-q {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}
/* choosing from the list opens it under the question, across the whole row */
.hub-gr .hub-gr-q:has(.hub-gr-list) { grid-column: 1 / -1; }
.hub-gr .hub-gr-q legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
}
/* the three answers as one segmented control; the chosen answer is the raised segment */
.hub-gr .hub-gr-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #eef1f5;
}
.hub-gr .hub-gr-seg .hub-gr-choice {
  position: relative;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: #344256;
}
.hub-gr .hub-gr-seg .hub-gr-choice input {
  position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0;
}
.hub-gr .hub-gr-seg .hub-gr-choice:hover { color: var(--ink-900); }
.hub-gr .hub-gr-seg .hub-gr-choice:has(input:checked) {
  background: #fff;
  color: var(--ink-900);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(11, 26, 43, .07);
}
.hub-gr .hub-gr-seg .hub-gr-choice:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.hub-gr .hub-gr-choice,
.hub-gr .hub-gr-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.hub-gr .hub-gr-src {
  font-size: 0.8rem;
  opacity: 0.75;
}
.hub-gr .hub-gr-list {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}
.hub-gr .hub-gr-cat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hub-gr .hub-gr-cat-name {
  margin: 0 0 0.2rem;
  font-weight: 600;
  font-size: 0.85rem;
}
.hub-gr .hub-gr-item {
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.45;
}
.hub-gr .hub-gr-item input { margin-top: 3px; }
.hub-gr .hub-gr-error {
  color: #b42318;
  margin: 0;
}
.hub-gr .hub-gr-ok {
  color: #067647;
}
