/* ----------------------------------------------------------------------- */
/* Definition list / field rows                                             */
/* ----------------------------------------------------------------------- */

.dl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-3) var(--gap-5);
  margin: 0;
}
.dl-grid dt {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 600;
  margin: 0;
}
.dl-grid dd {
  margin: 0 0 var(--gap-3);
  font-size: 0.95rem;
}
@media (min-width: 600px) {
  .dl-grid {
    grid-template-columns: 12rem 1fr;
    align-items: baseline;
  }
  .dl-grid dt { padding-top: 0.15rem; }
  .dl-grid dd { margin-bottom: 0; }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: var(--gap-3) 0;
  border-bottom: 1px dotted var(--rule);
}
.field-row:last-child { border-bottom: 0; }
.field-row dt {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-weight: 600;
}
.field-row dd { margin: 0; font-size: 0.95rem; }

/* Audit row — the whole <tr> is clickable when there are changes to
   reveal. The detail row sits directly underneath and animates its
   inner panel from height: 0 to natural via JS. */
.audit-row--expandable {
  cursor: pointer;
  transition: background 0.1s;
}
.audit-row--expandable:hover > td   { background: var(--surface-2); }
.audit-row--expandable.is-open > td { background: var(--accent-soft); }
.audit-row--expandable.is-open:hover > td { background: var(--accent-soft); }

.audit-row__indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-weight: 500;
  user-select: none;
}
.audit-row--expandable.is-open .audit-row__indicator { color: var(--accent); }

/* Detail row — invisible until expanded. We use a sub-row of the table
   so the drawer spans the full table width, not just the trigger cell. */
.audit-detail-row > td {
  padding: 0;
  border: 0;
  background: var(--bg);
}
.audit-detail-row:hover > td { background: var(--bg); }
.audit-detail-panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
}
.audit-detail-panel__inner {
  padding: var(--gap-3) var(--gap-4) var(--gap-4);
  border-bottom: 1px solid var(--rule);
}

/* Diff list — alternating sunken rows with diff-style added/removed pills.
   Sits inside .audit-detail-panel__inner which provides the surrounding
   padding; .dl-changes itself has zero outer margin. */
.dl-changes {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.dl-changes > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.4fr) 1fr;
  gap: 0.6rem;
  padding: 0.4rem 0.65rem;
  align-items: baseline;
  border-bottom: 1px solid var(--rule-soft);
}
.dl-changes > div:last-child { border-bottom: 0; }
.dl-changes > div:nth-child(even) { background: var(--surface-2); }
.dl-changes dt {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-changes dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
}
.dl-changes .added,
.dl-changes .removed {
  display: inline;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  font-size: 0.95em;
}
.dl-changes .added   { background: var(--ok-soft);  color: var(--ok); }
.dl-changes .removed { background: var(--err-soft); color: var(--err); text-decoration: line-through; text-decoration-thickness: 1px; }
.dl-changes .arrow   { color: var(--ink-faint); margin: 0 0.35rem; font-weight: 600; }

/* Plain row list with dotted dividers */
.row-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.row-list > li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap-3);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
  margin: 0;
}
.row-list > li:last-child { border-bottom: 0; }
