/* ── performance.css — Performance (journal + research) · Strategy drift (owner D) ──
   Cut verbatim from styles.css (UI 7.0 step 0). Loaded after styles.css and
   before the signals-*.css / boards.css sheets (see the <link> order in index.html). */

/* ── Performance (journal + research) ──────────────────────────────── */
.sp-head-actions { display: flex; align-items: center; gap: 7px; }
.sp-plan { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding-bottom: 3px; }
.sp-plan .f input[type="number"] { width: 112px; }
/* Inspector top switches: the strategy bar (beside Strategy) and the strategies table. */
.insp-switches { display: contents; }
.tbl select.insp-switch { height: 26px; padding: 0 22px 0 7px; font-size: 11.5px; }
select.insp-switch.ok { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, var(--surface)); }
select.insp-switch.warn { color: var(--warn); border-color: var(--warn-bd); }
.sp-check { align-self: flex-end; height: var(--ctl-h); }
.tbl tr.sp-dim td { opacity: .55; }
.sp-skips { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-2); }
.sp-skips li { padding: 2px 0; }
.sp-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: var(--gap); }
.sp-research-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--gap); }
.sp-research-bar .f { flex-direction: row; align-items: center; gap: 7px; }
.sp-research-bar .f > span { white-space: nowrap; }
.sp-research-bar select { min-width: 230px; max-width: 350px; }
.sp-research-bar .state { margin-left: 3px; }
.sp-research-bar .end { margin-left: auto; display: flex; align-items: center; gap: 7px; }

/* ── Strategy drift ──────────────────────────────────────────────────
   One card per strategy, ordered worst verdict first. The left edge
   carries the verdict so a column of cards reads as a triage list. */
.dr-card { border-left: 3px solid var(--border-2); }
.dr-card.ok { border-left-color: var(--pos); }
.dr-card.warn { border-left-color: var(--warn); }
.dr-card.bad { border-left-color: var(--neg); }
.dr-card .card-head h3 { display: flex; align-items: center; gap: 8px; }
.dr-spark-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.dr-spark { width: 150px; height: 32px; }
.dr-spark .l { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.dr-card tbody tr.dim td { opacity: 1; color: var(--muted); font-size: 11.5px; }
.dr-card .card-foot { font-size: 11.5px; }
.dr-card .card-foot b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .dr-spark-wrap { display: none; } }

@media (max-width: 640px) {
  .sp-research-bar select { min-width: 0; width: 100%; }
  .sp-research-bar .end { margin-left: 0; width: 100%; }
}

/* Phone: the alert journal's leg chips and "Replay a missed alert…" wrap
   under the heading instead of running off the right edge. */
@media (max-width: 899px) {
  .sp-head-actions { flex-wrap: wrap; row-gap: 6px; }
}

/* Standard account: the fill model's effects (#81) */
.sa-effects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 22px; }
.sa-effect { min-width: 0; }
.sa-effect-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sa-effect .hint { margin: 2px 0 6px; }

/* Journal window: a blank From/To (range "All") shows what it means. Safari
   paints an empty date input as today's date in grey, which reads like a
   one-day filter; hide that and lay the label over it. Focus brings the
   native editor back. The class is toggled by pages/performance.js. */
.f.date.sp-date-empty { position: relative; }
.f.date.sp-date-empty:not(:focus-within) input { color: transparent; }
.f.date.sp-date-empty:not(:focus-within) input::-webkit-datetime-edit { opacity: 0; }
.f.date.sp-date-empty:not(:focus-within)::after {
  content: attr(data-empty); position: absolute; left: 1px; bottom: 1px; height: calc(var(--ctl-h) - 2px);
  display: flex; align-items: center; padding: 0 9px; pointer-events: none;
  font: var(--fs-input) var(--font); color: var(--muted); white-space: nowrap;
}
/* Inspector robustness values (#109): the apply-to-selected bar and the per-strategy cells. */
.insp-bulk { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; border-bottom: 1px solid var(--border); }
.insp-bulk .f select { min-width: 92px; }
.insp-bulk-regime { display: flex; align-items: center; gap: 6px; }
input.insp-num { width: 84px; }
.tbl input.insp-num { height: 26px; padding: 0 7px; font-size: 11.5px; }
.insp-link { cursor: pointer; }
.insp-link:hover { text-decoration: underline; }
details.insp-pop { position: relative; display: inline-block; }
details.insp-pop > summary { list-style: none; white-space: nowrap; }
details.insp-pop > summary::-webkit-details-marker { display: none; }
.insp-pop-body { position: fixed; z-index: 60; min-width: 220px; max-height: 280px; overflow: auto;
  display: grid; gap: 4px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.insp-pop-body .f.check { flex-direction: row; align-items: center; gap: 7px; white-space: nowrap; }
@media (max-width: 720px) {
  .insp-bulk .f, .insp-bulk .btn { flex: 1 1 140px; }
  .insp-bulk input.insp-num { width: 100%; }
  .tbl td.meta:has(.insp-num, .insp-pop, .check) { overflow: visible; }
}
