.disclosure {
  --open: 0;
}

.disclosure[open] {
  --open: 1;
}

.disclosure-summary {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap-dense);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
}

.disclosure-summary::before {
  content: "▸";
  display: inline-block;
  transform: rotate(calc(var(--open) * 90deg));
  transition: transform 120ms;
}

.disclosure-summary:hover {
  color: var(--ink);
}

.disclosure-summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.disclosure-body {
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* A section of a list that opens in place: the summary is the section's
   head band at full tap height, the body flush under it. */
.disclosure-band {
  border-top: var(--line-width) solid var(--line);
}

.disclosure-summary-band {
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  min-height: var(--tap);
  padding: var(--space-1) var(--space-2);
  background: var(--surface-sunken);
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--ink);
}

.disclosure-body-band {
  padding: 0;
  font-size: var(--text-md);
}
