/* Memory provenance, Re-derive, Erasure and the Audit additions.
   Loaded after app.css; uses its tokens only. */

/* ── provenance on Memories cards and drawers ─────────────────────────── */
.prov-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; font-size: 11.5px; }
.prov-k { color: var(--text-3); font-size: 11.5px; }
a.prov-k { color: var(--accent-ink); text-decoration: none; }
a.prov-k:hover { text-decoration: underline; }
a.prov-pill { text-decoration: none; cursor: pointer; }
a.prov-pill:hover { background: var(--accent-line); color: #fff; }
.prov-gloss { margin-top: 3px; color: var(--text-3); font-size: 12px; }

/* ── shared by Re-derive / Erasure ────────────────────────────────────── */
.rd-sub { color: var(--text-3); font-size: 12px; }
.rd-form, .er-form { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.er-form { grid-template-columns: minmax(240px, 2fr) minmax(180px, 1.2fr) minmax(220px, 1.6fr) auto; }
.rd-form .field, .er-form .field { margin: 0; display: grid; gap: 6px; }
.rd-form .field > span, .er-form .field > span { font-size: 11px; font-weight: 680; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.rd-form-a { display: flex; gap: 8px; align-items: center; padding-bottom: 1px; }
.rd-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rd-stat { padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,0.025); min-width: 0; }
.rd-stat .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 5px; }
.rd-stat .v { font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; word-break: break-all; }
.rd-swap { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; }
.rd-swap input { width: 240px; padding: 5px 9px; }
.rd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.rd-tile { padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,0.025); }
.rd-tile.accent { border-color: var(--accent-line); background: var(--accent-soft); }
.rd-tile .v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rd-tile .k { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.rd-tile .s { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.rd-kv { margin-top: 10px; font-size: 12.5px; }
.rd-pick { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; font-size: 12.5px; color: var(--text-2); }
.rd-pick-a a { color: var(--accent-ink); text-decoration: none; }
.rd-evtable { max-height: 420px; overflow: auto; }
.rd-evtable td { padding: 6px 10px; }
.rd-text { color: var(--text-2); font-size: 12px; max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--text-2); }
.rd-actions label, .rd-apply label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.rd-apply { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.rd-wait input { width: 84px; padding: 4px 8px; }
.rd-jobhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 10px; }
.rd-steps { display: flex; gap: 4px; margin-bottom: 8px; }
.rd-step { flex: 1; text-align: center; font-size: 11px; font-weight: 650; padding: 6px 4px; border-radius: 7px; background: rgba(255,255,255,0.04); color: var(--text-3); }
.rd-step.done { background: var(--ok-soft); color: var(--ok); }
.rd-step.now { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rd-progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.rd-progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width 0.4s ease; }
.rd-log summary { cursor: pointer; color: var(--text-3); font-size: 12px; margin-top: 10px; }
.rd-log pre { max-height: 220px; overflow: auto; font-size: 11.5px; color: var(--text-2); background: rgba(0,0,0,0.3); padding: 8px 10px; border-radius: 8px; }
.rd-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd-abcol { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,0.025); display: grid; gap: 6px; }
.rd-big { font-size: 20px; font-weight: 700; }
.rd-difft td { vertical-align: top; }
.rd-difft td:first-child { width: 22%; }
.rd-fact { display: grid; gap: 1px; padding: 3px 0; font-size: 12.5px; line-height: 1.45; border-bottom: 1px dashed var(--line); }
.rd-fact:last-of-type { border-bottom: 0; }
.rd-en { color: var(--text-3); font-size: 11.5px; }
.rd-evsnip { margin-top: 4px; line-height: 1.4; }

/* ── Erasure ──────────────────────────────────────────────────────────── */
.er-confirm-row { display: flex; gap: 10px; align-items: center; }
.er-confirm-row input { max-width: 520px; }
.er-verdict { margin: 4px 0 12px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 650; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.er-verdict.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(45,212,167,0.3); }
.er-verdict.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(245,184,61,0.3); }
.er-verdict.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(244,104,95,0.35); }
.er-checks tr.er-bad td { background: var(--bad-soft); }
.er-down { color: var(--ok); font-weight: 650; }
.er-up { color: var(--warn); font-weight: 650; }
.er-same { color: var(--text-3); }

/* Console > Presentation mode: what is typed into a scope field is hidden. */
input.cx-secret { -webkit-text-security: disc; }

/* ── Audit ────────────────────────────────────────────────────────────── */
.au-gdpr { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); cursor: pointer; }
.au-focus { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); display: grid; gap: 8px; }
#au-table tr.au-hit td { background: var(--accent-soft); }

@media (max-width: 960px) {
  .rd-form, .er-form, .rd-status, .rd-tiles, .rd-ab { grid-template-columns: 1fr; }
}
