/* Program requirements, grouped and answerable in place (pnp-requirements.js).
   Uses the tokens defined in pnp-monitor.html. Tone per group:
   green = met, red = known gap, amber = to confirm, grey = program / later step. */

.req-ic { display: block; flex: none; }

/* Counts: two plain figures, no box. */
.req-counts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 16px 0 4px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.req-counts > div { display: flex; align-items: baseline; gap: 8px; }
.req-counts-n { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.req-counts-l { font-size: 12.5px; color: var(--ink-soft); }

/* Groups */
.req-group { margin-top: 20px; }
.req-group-head { display: flex; align-items: center; gap: 9px; }
.req-group-head h5 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.req-count { font-weight: 500; color: var(--ink-faint); margin-left: 2px; font-variant-numeric: tabular-nums; }
.req-chip { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.req-chip.green { background: var(--green-bg); color: var(--green); }
.req-chip.red { background: var(--red-bg); color: var(--red); }
.req-chip.amber { background: var(--amber-bg); color: var(--amber); }
.req-chip.grey { background: var(--bg-soft); color: var(--ink-soft); }
.req-group-sub { font-size: 12.5px; color: var(--ink-faint); margin: 5px 0 0 33px; line-height: 1.5; }

.req-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.req-row { padding: 10px 12px; border-radius: 8px; background: var(--bg-soft); font-size: 13px; }
.req-group.later .req-row { background: transparent; border: 1px dashed #cfced8; }
.req-row .lbl, .req-toggle .lbl { font-weight: 500; color: var(--ink); display: block; line-height: 1.4; }
.req-row .val { color: var(--ink-soft); font-size: 12.5px; display: block; margin-top: 2px; }
.req-row .why, .req-toggle .why { color: var(--ink-faint); font-size: 12px; margin-top: 4px; display: block; line-height: 1.5; }
.req-inline-link { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 500; }

.req-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.req-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 100px; background: #ededf2; color: #5f5e6b; white-space: nowrap; }
.req-tag.impact { background: #fff0f6; color: #b0005a; }

/* To confirm: each item is a disclosure that opens its own short form. */
.req-confirm { border: 1px solid #ecd9b4; border-radius: 8px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.req-confirm:hover { border-color: #e2c48f; }
.req-confirm.open { border-color: #e2c48f; box-shadow: 0 6px 18px -14px rgba(120, 80, 0, .45); }
.req-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 11px 12px; background: none; border: none; text-align: left; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); border-radius: 8px; }
.req-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.req-toggle-text { min-width: 0; flex: 1; }
.req-toggle-cta { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.req-toggle-cta .req-ic { transition: transform .18s ease; }
.req-toggle[aria-expanded="true"] .req-toggle-cta .req-ic { transform: rotate(180deg); }
.req-toggle[aria-expanded="true"] .req-toggle-verb { visibility: hidden; }

.req-panel { border-top: 1px solid var(--border); padding: 14px 12px 12px; animation: req-open .18s ease-out; }
@keyframes req-open { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.req-editor .req-q { margin: 0 0 14px; }
.req-editor .req-q legend, .req-editor .req-q > label { font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 7px; display: block; line-height: 1.45; padding: 0; }
.req-editor select, .req-editor input[type=number], .req-editor input[type=text] { margin-bottom: 0; min-height: 44px; }
.req-choice-3 .choice span { padding: 11px 8px; }
.req-follow { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px; margin: -4px 0 14px; }
.req-follow > :last-child { margin-bottom: 0; }
.req-follow[hidden] { display: none; }
.req-follow .req-q + .req-scores { margin-top: -2px; }
.req-scores { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.req-scores label { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.req-num { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.req-num-suffix { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.req-hint { font-size: 12px; color: var(--ink-faint); margin: 6px 0 0; line-height: 1.5; }
.req-editor-note { margin: 0 0 12px; }
.req-profile-link { margin: 0 0 16px; }
.req-profile-link .btn { margin-top: 8px; min-height: 44px; }
.req-profile-link .req-hint { margin-top: 0; }
.req-noc .noc-confirmed { margin-bottom: 0; min-height: 44px; }
.req-noc .noc-confirmed .req-ic { display: inline-block; vertical-align: -2px; color: var(--green); }

.req-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.req-editor-actions .btn { min-height: 44px; padding: 10px 18px; }
.req-save.saved { background: var(--green); opacity: 1; }
.req-spin { display: inline-flex; animation: req-spin .8s linear infinite; }
@keyframes req-spin { to { transform: rotate(360deg); } }
.req-note { font-size: 12.5px; color: #7a5a1e; background: var(--amber-bg); border-radius: var(--radius-sm); padding: 9px 12px; margin: 0 0 12px; }
.req-editor-msg .msg { margin-bottom: 12px; }

/* After saving: what changed. */
.req-banner { display: flex; gap: 11px; align-items: flex-start; background: var(--green-bg); border: 1px solid #cfe9d8; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; color: #155c33; font-size: 13px; animation: req-open .25s ease-out; }
.req-banner > .req-ic { color: var(--green); margin-top: 2px; }
.req-banner strong { display: block; font-weight: 600; color: #155c33; }
.req-banner ul { margin: 4px 0 0; padding-left: 16px; }
.req-banner li { line-height: 1.55; }
.req-banner p { margin: 3px 0 0; color: #155c33; font-size: 13px; }
.req-banner.neutral { background: var(--bg-soft); border-color: var(--border); color: var(--ink-soft); }
.req-banner.neutral > .req-ic, .req-banner.neutral strong, .req-banner.neutral p { color: var(--ink-soft); }
.mic-modal-body .req-banner { margin-right: 34px; }

/* My profile form: job-offer details open under "has offer". */
.form-follow { border-left: 2px solid var(--border); padding-left: 12px; margin-bottom: 4px; }
[data-form-follow][hidden] { display: none; }

@media (max-width: 640px) {
  .req-editor select, .req-editor input { font-size: 16px; }
  .req-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req-editor-actions { flex-direction: column; }
  .req-editor-actions .btn { width: 100%; }
  .req-num { max-width: none; }
  .req-counts { gap: 4px 20px; }
  .req-group-sub { margin-left: 0; }
  .req-toggle { padding: 11px 10px; align-items: flex-start; }
  .req-toggle-verb { display: none; }
  .req-toggle-cta { width: 28px; height: 28px; justify-content: center; border-radius: 50%; background: #eaf5ff; }
  .req-panel { padding: 14px 10px 12px; }
  .mic-modal-body .req-banner { margin-right: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .req-panel, .req-banner { animation: none; }
  .req-spin { animation-duration: 2s; }
}

/* Long official-source URLs wrap instead of widening the modal. */
.mic-modal-body a { overflow-wrap: anywhere; }
