/* Versions and the people in a shared draft (track SD8; docs/editing_plan/06-versions-and-history.md and 07-permissions.md): the three links that join a draft's pages (the draft,
   its versions, its people), one version read on a page of its own, and how a submitted answer was drafted (Editing::DraftingHistoryComponent), drawn under the answer on its own
   page. The history list, the comparison, the restore sheet and the people list are SDC's components, styled in 24-editing.css; this sheet adds only what the pages around them need.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell and the console, in light and in
   dark, and mirrors in a right-to-left language. Nothing pinned to an edge, no height in vh, and everything that holds words may shrink and wrap, so a language 40% longer never widens
   the page (WCAG 1.4.10). A disclosure's summary is at least the chip's height, 24 CSS px and more (WCAG 2.5.8). */

/* ── A draft's three pages ───────────────────────────────────────────────
   A row of links that wraps under itself on a phone; the page this is is marked in words for a screen reader (aria-current) and by a rule under it, never by color alone. */
.editing-draft-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.editing-draft-nav__link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--density-chip);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.editing-draft-nav__link[aria-current="page"] {
  color: var(--fg1);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ── One version, read ───────────────────────────────────────────────────
   Who kept it and when, what it came from, and its answers in the form's own layout. */
/* The way back to choose two other versions is a link on a line of its own, so it is a target of at least 24px (WCAG 2.5.8). */
.editing-compare__others {
  display: inline-block;
  min-block-size: 24px;
}

.editing-version-page {
  display: grid;
  gap: var(--density-block);
  min-inline-size: 0;
}

.editing-version-page__facts {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.editing-version-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* ── How an answer was drafted ───────────────────────────────────────────
   The versions as cards, newest first; each opens its answers and what changed from the one before. */
.editing-drafting {
  display: grid;
  gap: var(--density-gap);
  min-inline-size: 0;
  margin-block-start: var(--space-4);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--rule);
}

.editing-drafting__title,
.editing-drafting__version-title {
  margin-block: 0;
  overflow-wrap: anywhere;
}

.editing-drafting__version-title {
  font-size: var(--text-base);
}

.editing-drafting__lede,
.editing-drafting__made,
.editing-drafting__pending {
  margin-block: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.editing-drafting__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.editing-drafting__version > article {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.editing-drafting__more {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}

.editing-drafting__more > summary {
  min-block-size: var(--density-chip);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.editing-drafting__body {
  min-inline-size: 0;
}
