/* Change log (#28): one change as a card. Base rules only; the width-dependent layout is in
   desk-changes.css, which loads after this file. Tokens only. */

.chg-row {
  gap: 8px 18px;
  transition: box-shadow 160ms var(--ease-out);
}
.chg-row:hover {
  box-shadow: var(--shadow-2);
}
.chg-row.is-offaccount {
  border-style: dashed;
  border-color: var(--rule);
  background: var(--surface-2);
}
.chg-row:target {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chg-date {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chg-date-main {
  font: 680 20px/1.15 var(--display);
  color: var(--ink);
}
.chg-date-sub {
  font-weight: 500;
}
.chg-date-main + .chg-date-sub::before {
  content: "· ";
}
.chg-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.chg-body > * {
  margin: 0;
  min-width: 0;
}
.chg-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chg-tag {
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: 650 13px/1.2 var(--body);
  color: var(--ink-2);
}
.chg-tag-lever {
  border-color: transparent;
  background: var(--surface-3);
}
.chg-tag-off {
  border-style: dashed;
  border-color: var(--ink-3);
}
.chg-text {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.is-observation .chg-text {
  color: var(--ink-2);
}
.chg-arrow {
  color: var(--accent);
  font-weight: 800;
}
.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.chg-fact-v.is-clamped {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.chg-more {
  justify-self: start;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: 650 14px/1.2 var(--body);
  cursor: pointer;
}
.chg-more:hover {
  text-decoration: underline;
}
.chg-campaign {
  font-size: 14px;
  color: var(--ink-3);
}
.chg-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 18px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.chg-facts > div {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
}
.chg-facts dt {
  font: 650 13px/1.3 var(--body);
  color: var(--ink-3);
}
.chg-facts dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
.chg-notes {
  display: grid;
  gap: 6px;
}
.chg-notes-h {
  margin: 0;
  font: 650 13px/1.3 var(--body);
  color: var(--ink-3);
}
/* Card foot: "Details" and "Add a note" share one line while closed; an open one takes the full width. */
.chg-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 18px;
}
.chg-foot > details {
  min-width: 0;
}
.chg-foot > details[open] {
  flex: 1 1 100%;
}
.chg-details > summary {
  display: inline-block;
  padding-block: 13px; /* a 44px touch target on a phone */
  color: var(--ink-3);
  font: 650 14px/1.4 var(--body);
  cursor: pointer;
}
.chg-details > summary:hover {
  color: var(--accent);
}
.chg-details > summary::before {
  content: "▸ ";
}
.chg-details[open] > summary::before {
  content: "▾ ";
}
.chg-facts-detail {
  margin: 0 0 4px;
}
.chg-add > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  list-style: none;
  border-color: var(--rule);
}
.chg-add > summary::-webkit-details-marker {
  display: none;
}
.chg-add > summary::before {
  content: "+";
  margin-right: 6px;
  font-weight: 800;
}
.chg-add[open] > summary::before {
  content: "−";
}
.chg-add .note-form {
  padding-top: 10px;
}
